TestSchmidMottok.java 2.08 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14

package mvd.jester.tests;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

/**
 * TestSchmidMottok
 */
public class TestSchmidMottok {

    @Test
    @DisplayName("Check if the schedulability check returns the correct values.")
    public void testRunSchedulabilityCheck() {
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
        // {
        // SystemSetup<SynchronousTask> systemSetup =
        // SystemSetup.readFromFile("src/test/resources/Taskset1.txt", 4);
        // SchmidMottok sm = new SchmidMottok(systemSetup);

        // SchedulingInfo schedulingInfo = sm.runSchedulabilityCheck(new RateMonotonic());

        // assertTrue(schedulingInfo.getTerminationInfos().size() == 4);
        // assertTrue(schedulingInfo.checkLevelFail(Level.HIGH) == true);
        // assertTrue(schedulingInfo.checkTasksetFeasible() == false);
        // assertTrue(schedulingInfo.getFailedTerminationInfo().isPresent());
        // }
        // {
        // SystemSetup<SynchronousTask> systemSetup =
        // SystemSetup.readFromFile("src/test/resources/Taskset1.txt", 8);
        // SchmidMottok sm = new SchmidMottok(systemSetup);

        // SchedulingInfo schedulingInfo = sm.runSchedulabilityCheck(new RateMonotonic());

        // assertTrue(schedulingInfo.getTerminationInfos().size() == 4);
        // assertTrue(schedulingInfo.checkLevelFail(Level.HIGH) == true);
        // assertTrue(schedulingInfo.checkTasksetFeasible() == false);
        // assertTrue(schedulingInfo.getFailedTerminationInfo().isPresent());
        // }
        // {
        // SystemSetup<SynchronousTask> systemSetup =
        // SystemSetup.readFromFile("src/test/resources/Taskset1.txt", 16);
        // SchmidMottok sm = new SchmidMottok(systemSetup);

        // SchedulingInfo schedulingInfo = sm.runSchedulabilityCheck(new RateMonotonic());

        // assertTrue(schedulingInfo.getTerminationInfos().size() == 4);
        // assertTrue(schedulingInfo.checkLevelFail(Level.HIGH) == false);
        // assertTrue(schedulingInfo.checkTasksetFeasible() == true);
        // assertTrue(!schedulingInfo.getFailedTerminationInfo().isPresent());
        // }
51 52
    }
}