Search in sources :

Example 21 with SchedulerTHelper

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

the class RunningTaskRecoveryWithDownNodeTest 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);
    // timeout of 30 seconds for the running task and the scheduler to reconnect
    PASchedulerProperties.SCHEDULER_NODE_PING_ATTEMPTS.updateProperty("3");
    PASchedulerProperties.SCHEDULER_NODE_PING_FREQUENCY.updateProperty("10");
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) File(java.io.File) Before(org.junit.Before)

Example 22 with SchedulerTHelper

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

the class RunningTaskRecoveryWithDownNodeTest method restartScheduler.

private void restartScheduler() throws Exception {
    schedulerHelper = new SchedulerTHelper(false, new File(SCHEDULER_CONFIGURATION_RESTART.toURI()).getAbsolutePath(), new File(RM_CONFIGURATION_RESTART.toURI()).getAbsolutePath(), null, false);
    this.createNodes();
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) File(java.io.File)

Example 23 with SchedulerTHelper

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

the class TestNodeDiesAtSchedulerRestart method nodeDiesAtSchedulerRestart.

@Test(timeout = 300000)
public void nodeDiesAtSchedulerRestart() throws Throwable {
    testNode = schedulerHelper.createRMNodeStarterNode("nodeDiesAtSchedulerRestart");
    schedulerHelper.waitForAnyNodeEvent(RMEventType.NODE_ADDED, 120000);
    schedulerHelper.waitForAnyNodeEvent(RMEventType.NODE_STATE_CHANGED, 10000);
    schedulerHelper.killScheduler();
    Assert.assertFalse(testNode.getNodeProcess().isFinished());
    schedulerHelper = new SchedulerTHelper(true, true);
    int exitCode = testNode.getNodeProcess().waitFor();
    Assert.assertEquals(306, exitCode);
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) Test(org.junit.Test)

Example 24 with SchedulerTHelper

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

the class TestRunAsMeLinuxNone method startDedicatedScheduler.

@BeforeClass
public static void startDedicatedScheduler() throws Exception {
    assumeTrue(OperatingSystem.getOperatingSystem() == OperatingSystem.unix);
    setupUser();
    RMFactory.setOsJavaProperty();
    // start an empty scheduler and add a node source with modified properties
    schedulerHelper = new SchedulerTHelper(true, true);
    List<String> arguments = new ArrayList<>();
    arguments.addAll(RMTHelper.setup.getJvmParametersAsList());
    arguments.add("-D" + ForkerUtils.FORK_METHOD_KEY + "=" + ForkerUtils.ForkMethod.NONE.toString());
    schedulerHelper.createNodeSource("RunAsMeNSNone", 5, arguments);
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) ArrayList(java.util.ArrayList) BeforeClass(org.junit.BeforeClass)

Example 25 with SchedulerTHelper

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

the class TestRunAsMeLinuxPwd method startDedicatedScheduler.

@BeforeClass
public static void startDedicatedScheduler() throws Exception {
    assumeTrue(OperatingSystem.getOperatingSystem() == OperatingSystem.unix);
    setupUser();
    RMFactory.setOsJavaProperty();
    // start an empty scheduler and add a node source with modified properties
    schedulerHelper = new SchedulerTHelper(true, true);
    List<String> arguments = new ArrayList<>();
    arguments.addAll(RMTHelper.setup.getJvmParametersAsList());
    arguments.add("-D" + ForkerUtils.FORK_METHOD_KEY + "=" + ForkerUtils.ForkMethod.PWD.toString());
    schedulerHelper.createNodeSource("RunAsMeNSPwd", 5, arguments);
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) ArrayList(java.util.ArrayList) BeforeClass(org.junit.BeforeClass)

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