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

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

        final double time0 = 0.5;
        instance.updateProcessing(time0, instance.getCurrentMipsShare());
        assertEquals(2, instance.getCloudletExecList().size());

        final double time1 = 1.0;
        instance.updateProcessing(time1, 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 2 PEs,
     * one for each cloudlet. The cloudlet length is equals to the capacity of
     * each PE, meaning that each cloudlet will finish in just one second.
     */
This test runs 2 cloudlets requiring just 1 PE each one.
These cloudlets are run in a CloudletScheduler having 2 PEs,
one for each cloudlet. The cloudlet length is equals to the capacity of
each PE, meaning that each cloudlet will finish in just one second.
This test runs 2 cloudlets requiring just 1 PE each one . These cloudlets are run in a CloudletScheduler having 2 PEs one for each cloudlet . The cloudlet length is equals to the capacity of each PE meaning that each cloudlet will finish in just one second .
@Test
    public void testGetCloudletExecList_EmptyAfterFinishedCloudletsForTwoSchedulerPes() {
        final long mips = 1000;
        final int numberOfCloudlets = 2;
        final CloudletSchedulerTimeShared instance = newSchedulerWithSingleCoreRunningCloudlets(mips, numberOfCloudlets, numberOfCloudlets);
        final double time0 = 0.5;
        instance.updateProcessing(time0, instance.getCurrentMipsShare());
        assertEquals(2, instance.getCloudletExecList().size());
        final double time1 = 1.0;
        instance.updateProcessing(time1, instance.getCurrentMipsShare());
        assertTrue(instance.getCloudletExecList().isEmpty());
    }
@ Test public void testGetCloudletExecList_EmptyAfterFinishedCloudletsForTwoSchedulerPes ( ) { final long mips = 1000 ; final int numberOfCloudlets = 2 ; final CloudletSchedulerTimeShared instance = newSchedulerWithSingleCoreRunningCloudlets ( mips , numberOfCloudlets , numberOfCloudlets ) ; final double time0 = 0.5 ; instance . updateProcessing ( time0 , instance . getCurrentMipsShare ( ) ) ; assertEquals ( 2 , instance . getCloudletExecList ( ) . size ( ) ) ; final double time1 = 1.0 ; instance . updateProcessing ( time1 , 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 .