cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/test/java/org/cloudbus/cloudsim/schedulers/cloudlet/CloudletSchedulerTimeSharedTest.java
@Test
    public void testGetCloudletExecList_EmptyAfterFinishedCloudletsForOneSchedulerPe() {
        final long mips = 1000;
        final int numberOfCloudlets = 2;

        final CloudletSchedulerTimeShared instance = newSchedulerWithSingleCoreRunningCloudlets(mips, 1, numberOfCloudlets);

        final double time1 = 1;
        instance.updateProcessing(time1, instance.getCurrentMipsShare());
        assertEquals(2, instance.getCloudletExecList().size());

        final double time2 = 2;
        instance.updateProcessing(time2, instance.getCurrentMipsShare());
        assertTrue(instance.getCloudletExecList().isEmpty());
    }
/**
     * This test runs 2 cloudlets requiring just 1 PE each one.
     * These cloudlets are run in a CloudletScheduler having just 1 PE
     * that is shared between the cloudlets.
     * The cloudlet length is equals to the capacity of
     * each PE, meaning that each cloudlet will finish in just 2 second
     * because there is just 1 PE.
     */
This test runs 2 cloudlets requiring just 1 PE each one.
These cloudlets are run in a CloudletScheduler having just 1 PE
that is shared between the cloudlets.
The cloudlet length is equals to the capacity of
each PE, meaning that each cloudlet will finish in just 2 second
because there is just 1 PE.
This test runs 2 cloudlets requiring just 1 PE each one . These cloudlets are run in a CloudletScheduler having just 1 PE that is shared between the cloudlets . The cloudlet length is equals to the capacity of each PE meaning that each cloudlet will finish in just 2 second because there is just 1 PE .
@Test
    public void testGetCloudletExecList_EmptyAfterFinishedCloudletsForOneSchedulerPe() {
        final long mips = 1000;
        final int numberOfCloudlets = 2;
        final CloudletSchedulerTimeShared instance = newSchedulerWithSingleCoreRunningCloudlets(mips, 1, numberOfCloudlets);
        final double time1 = 1;
        instance.updateProcessing(time1, instance.getCurrentMipsShare());
        assertEquals(2, instance.getCloudletExecList().size());
        final double time2 = 2;
        instance.updateProcessing(time2, instance.getCurrentMipsShare());
        assertTrue(instance.getCloudletExecList().isEmpty());
    }
@ Test public void testGetCloudletExecList_EmptyAfterFinishedCloudletsForOneSchedulerPe ( ) { final long mips = 1000 ; final int numberOfCloudlets = 2 ; final CloudletSchedulerTimeShared instance = newSchedulerWithSingleCoreRunningCloudlets ( mips , 1 , numberOfCloudlets ) ; final double time1 = 1 ; instance . updateProcessing ( time1 , instance . getCurrentMipsShare ( ) ) ; assertEquals ( 2 , instance . getCloudletExecList ( ) . size ( ) ) ; final double time2 = 2 ; instance . updateProcessing ( time2 , instance . getCurrentMipsShare ( ) ) ; assertTrue ( instance . getCloudletExecList ( ) . isEmpty ( ) ) ; }
This test runs 2 cloudlets requiring just 1 PE each one.
This test runs 2 cloudlets requiring just 1 PE each one .