Search in sources :

Example 16 with SchedulerTHelper

use of functionaltests.utils.SchedulerTHelper in project scheduling by ow2-proactive.

the class TestPreemptRestartKillTask method startSchedulerInAnyCase.

@BeforeClass
public static void startSchedulerInAnyCase() throws Exception {
    schedulerHelper.log("Starting a clean scheduler.");
    schedulerHelper = new SchedulerTHelper(true, configFile.getPath());
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) BeforeClass(org.junit.BeforeClass)

Example 17 with SchedulerTHelper

use of functionaltests.utils.SchedulerTHelper in project scheduling by ow2-proactive.

the class TestPreemptRestartKillTaskSchema33 method startSchedulerInAnyCase.

@BeforeClass
public static void startSchedulerInAnyCase() throws Exception {
    schedulerHelper.log("Starting a clean scheduler.");
    schedulerHelper = new SchedulerTHelper(true, configFile.getPath());
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) BeforeClass(org.junit.BeforeClass)

Example 18 with SchedulerTHelper

use of functionaltests.utils.SchedulerTHelper in project scheduling by ow2-proactive.

the class TestDisabledListenJobLogs method startDedicatedScheduler.

@BeforeClass
public static void startDedicatedScheduler() throws Exception {
    log("Creating the scheduler");
    schedulerHelper = new SchedulerTHelper(true, new File(SchedulerTHelper.class.getResource("/functionaltests/config/scheduler-disablelistenjoblogs.ini").toURI()).getAbsolutePath());
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) File(java.io.File) BeforeClass(org.junit.BeforeClass)

Example 19 with SchedulerTHelper

use of functionaltests.utils.SchedulerTHelper in project scheduling by ow2-proactive.

the class GetResultMetricTest method test.

@Test(timeout = 3600000)
public void test() throws Exception {
    // in milliseconds
    final int taskDuration = 1000;
    final int nodeNumber = 1;
    ProActiveConfiguration.load();
    RMFactory.setOsJavaProperty();
    schedulerHelper = new SchedulerTHelper(false, SCHEDULER_CONFIGURATION_START.getPath(), RM_CONFIGURATION_START.getPath(), null);
    schedulerHelper.createNodeSourceWithInfiniteTimeout("local", nodeNumber);
    final TaskFlowJob job = SchedulerEfficiencyMetricsTest.createJob(taskNumber, taskDuration);
    final long start = System.currentTimeMillis();
    jobId = schedulerHelper.submitJob(job);
    schedulerHelper.waitForEventJobFinished(jobId);
    final JobResult jobResult = schedulerHelper.getSchedulerInterface().getJobResult(jobId);
    long wholeTime = System.currentTimeMillis() - start;
    long timeToGetResult = wholeTime - taskDuration;
    LOGGER.info(makeCSVString(GetResultMetricTest.class.getSimpleName(), taskNumber, timeLimit, timeToGetResult, ((timeToGetResult < timeLimit) ? SUCCESS : FAILURE)));
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) JobResult(org.ow2.proactive.scheduler.common.job.JobResult) TaskFlowJob(org.ow2.proactive.scheduler.common.job.TaskFlowJob) Test(org.junit.Test)

Example 20 with SchedulerTHelper

use of functionaltests.utils.SchedulerTHelper in project scheduling by ow2-proactive.

the class RunningTaskRecoveryWhenNodesAreReservedInBatchTest method startDedicatedScheduler.

@Before
public void startDedicatedScheduler() throws Exception {
    RMFactory.setOsJavaProperty();
    schedulerHelper = new SchedulerTHelper(false, new File(SCHEDULER_CONFIGURATION_START.toURI()).getAbsolutePath(), new File(RM_CONFIGURATION_START.toURI()).getAbsolutePath(), null);
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) File(java.io.File)

Aggregations

SchedulerTHelper (functionaltests.utils.SchedulerTHelper)27 File (java.io.File)14 BeforeClass (org.junit.BeforeClass)14 Test (org.junit.Test)7 ArrayList (java.util.ArrayList)5 JobState (org.ow2.proactive.scheduler.common.job.JobState)5 TaskFlowJob (org.ow2.proactive.scheduler.common.job.TaskFlowJob)5 JobId (org.ow2.proactive.scheduler.common.job.JobId)4 TaskState (org.ow2.proactive.scheduler.common.task.TaskState)3 SchedulerFunctionalTest (functionaltests.utils.SchedulerFunctionalTest)2 Before (org.junit.Before)2 TestListenJobLogs (functionaltests.job.log.TestListenJobLogs)1 SchedulerStartForFunctionalTest (functionaltests.utils.SchedulerStartForFunctionalTest)1 TestScheduler (functionaltests.utils.TestScheduler)1 FileSystemServerDeployer (org.objectweb.proactive.extensions.vfsprovider.FileSystemServerDeployer)1 Scheduler (org.ow2.proactive.scheduler.common.Scheduler)1 JobInfo (org.ow2.proactive.scheduler.common.job.JobInfo)1 JobResult (org.ow2.proactive.scheduler.common.job.JobResult)1 TaskResult (org.ow2.proactive.scheduler.common.task.TaskResult)1 LogForwardingService (org.ow2.proactive.scheduler.common.util.logforwarder.LogForwardingService)1