use of org.ow2.proactive.scheduler.common.job.JobState in project scheduling by ow2-proactive.
the class SchedulerStateRestPaginationTest method testGetJobTaskStatesByTagPaginated.
@Test
public void testGetJobTaskStatesByTagPaginated() throws Throwable {
JobState job = newMockedJob(jobIdStr, nbTasks);
when(mockOfScheduler.getJobState(jobIdStr)).thenReturn(job);
List<TaskStateData> res = restInterface.getJobTaskStatesByTagPaginated(sessionId, jobIdStr, "", 0, nbTasks).getList();
assertEquals("Number of tasks is incorrect", nbTasks, res.size());
}
use of org.ow2.proactive.scheduler.common.job.JobState in project scheduling by ow2-proactive.
the class SchedulerStateRestPaginationTest method testGetJobTaskStatesPaginated.
@Test
public void testGetJobTaskStatesPaginated() throws Throwable {
JobState job = newMockedJob(jobIdStr, nbTasks);
when(mockOfScheduler.getJobState(jobIdStr)).thenReturn(job);
List<TaskStateData> res = restInterface.getJobTaskStatesPaginated(sessionId, jobIdStr, 0, nbTasks).getList();
assertEquals("Number of tasks is incorrect", nbTasks, res.size());
}
use of org.ow2.proactive.scheduler.common.job.JobState in project scheduling by ow2-proactive.
the class SchedulerStateRestTaskCentricTest method testGetJobTasksIdsByTagPaginated.
@Test
public void testGetJobTasksIdsByTagPaginated() throws Throwable {
int nbTasks = 50;
String jobIdStr = "1";
JobState job = RestTestUtils.newMockedJob(jobIdStr, "", nbTasks);
when(mockOfScheduler.getJobState(jobIdStr)).thenReturn(job);
RestPage<String> page = restInterface.getTasksNamesPaginated(sessionId, jobIdStr, 0, nbTasks);
RestTestUtils.assertTasks(nbTasks, jobIdStr, page);
}
use of org.ow2.proactive.scheduler.common.job.JobState in project scheduling by ow2-proactive.
the class SchedulerStateRestTaskCentricTest method testGetJobTasksIdsPaginated.
@Test
public void testGetJobTasksIdsPaginated() throws Throwable {
int nbTasks = 50;
String jobIdStr = "1";
JobState job = RestTestUtils.newMockedJob(jobIdStr, "", nbTasks);
when(mockOfScheduler.getJobState(jobIdStr)).thenReturn(job);
RestPage<String> page = restInterface.getTasksNamesPaginated(sessionId, jobIdStr, 0, nbTasks);
RestTestUtils.assertTasks(nbTasks, jobIdStr, page);
}
use of org.ow2.proactive.scheduler.common.job.JobState in project scheduling by ow2-proactive.
the class SchedulerStateRestTaskCentricTest method testGetJobTaskStatesPaginated.
@Test
public void testGetJobTaskStatesPaginated() throws Throwable {
int nbTasks = 50;
String jobIdStr = "1";
JobState job = RestTestUtils.newMockedJob(jobIdStr, null, nbTasks);
when(mockOfScheduler.getJobState(jobIdStr)).thenReturn(job);
List<TaskStateData> res = restInterface.getJobTaskStatesPaginated(sessionId, jobIdStr, 0, nbTasks).getList();
assertEquals("Number of tasks is incorrect", nbTasks, res.size());
}
Aggregations