use of org.ow2.proactive.scripting.SelectionScript in project scheduling by ow2-proactive.
the class TestJobSchedulingStarvationAndPriority method createJobHighSelectFalse.
/*
* Job high priority with one task, task's selection script always returns 'false' so task can't
* start
*/
private TaskFlowJob createJobHighSelectFalse() throws Exception {
TaskFlowJob job = new TaskFlowJob();
job.setName(this.getClass().getSimpleName() + "_High_SelectFalse");
job.setPriority(JobPriority.HIGHEST);
JavaTask javaTask = new JavaTask();
javaTask.setExecutableClassName(EmptyTask.class.getName());
javaTask.setName("taskSelectFalse");
SelectionScript selScript = new SelectionScript("selected = false;", "js");
javaTask.setSelectionScript(selScript);
job.addTask(javaTask);
return job;
}
Aggregations