Search in sources :

Example 26 with SchedulerTHelper

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

the class TestRunAsMeWindows method startDedicatedScheduler.

@BeforeClass
public static void startDedicatedScheduler() throws Exception {
    assumeTrue(OperatingSystem.getOperatingSystem() == OperatingSystem.windows);
    setupUser();
    sharedDirectory = System.getProperty(RUNASME_SHARED_DIR_PROPNAME);
    assumeNotNull(sharedDirectory);
    RMFactory.setOsJavaProperty();
    // start an empty scheduler and add a node source with modified properties
    schedulerHelper = new SchedulerTHelper(true, true);
    List<String> arguments = new ArrayList<>();
    // change the proactive home directory to the shared directory, proactive libs are copied before the test to this folder
    // this ensures that the forked jvm will be able to access the proactive jars
    arguments.addAll(setProActiveHomeInJVMParametersList(RMTHelper.setup.getJvmParametersAsList()));
    arguments.add("-D" + ForkerUtils.FORK_METHOD_KEY + "=" + ForkerUtils.ForkMethod.PWD.toString());
    arguments.add("-Djava.io.tmpdir=" + sharedDirectory);
    arguments.add("-Dpa.logs.home=" + sharedDirectory);
    schedulerHelper.createNodeSource("RunAsMeNS", 5, arguments);
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) ArrayList(java.util.ArrayList) BeforeClass(org.junit.BeforeClass)

Example 27 with SchedulerTHelper

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

the class TestVariablesPropagation method startSchedulerInAnyCase.

@BeforeClass
public static void startSchedulerInAnyCase() throws Exception {
    SchedulerTHelper.log("Starting a clean scheduler.");
    schedulerHelper = new SchedulerTHelper(true, configFile.getPath());
}
Also used : SchedulerTHelper(functionaltests.utils.SchedulerTHelper) 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