use of org.ow2.proactive.scheduler.job.JobIdImpl in project scheduling by ow2-proactive.
the class JobLoggerTest method testGetJobLogFilename.
@Test
public void testGetJobLogFilename() {
JobId id = new JobIdImpl(1123, "readableName");
assertThat(JobLogger.getJobLogRelativePath(id), is("1123/1123"));
}
use of org.ow2.proactive.scheduler.job.JobIdImpl in project scheduling by ow2-proactive.
the class TaskLoggerTest method testGetJobLogFilename.
@Test
public void testGetJobLogFilename() {
JobId jobId = new JobIdImpl(1123, "readableName");
TaskId taskId = TaskIdImpl.createTaskId(jobId, "taskreadableName", 123123);
assertThat(TaskLogger.getTaskLogRelativePath(taskId), is("1123/1123t123123"));
}
use of org.ow2.proactive.scheduler.job.JobIdImpl in project scheduling by ow2-proactive.
the class JobEmailNotificationTest method testJobRestartedFromError.
@Test
public void testJobRestartedFromError() throws Exception {
InternalJob job = createJob(USER_EMAIL);
job.setId(new JobIdImpl(123890, job.getName()));
job.setStatus(JobStatus.RUNNING);
Map<String, String> genericInfo = job.getGenericInformation();
genericInfo.put("NOTIFICATION_EVENTS", "Job restarted from error");
job.setGenericInformation(genericInfo);
boolean sent = sendNotification(job, SchedulerEvent.JOB_RESTARTED_FROM_ERROR, stubbedSender);
assertTrue(sent);
verify(stubbedSender).sender(eq(USER_EMAIL), contains("ProActive Job 123890 : Job restarted from error"), contains("Status: Running"));
verifyNoMoreInteractions(stubbedSender);
}
use of org.ow2.proactive.scheduler.job.JobIdImpl in project scheduling by ow2-proactive.
the class JobEmailNotificationTest method testFinished.
@Test
public void testFinished() throws Exception {
InternalJob job = createJob(USER_EMAIL);
job.setId(new JobIdImpl(123890, job.getName()));
job.setStatus(JobStatus.FINISHED);
Map<String, String> genericInfo = job.getGenericInformation();
genericInfo.put("NOTIFICATION_EVENTS", "Job running to finished");
job.setGenericInformation(genericInfo);
boolean sent = sendNotification(job, SchedulerEvent.JOB_RUNNING_TO_FINISHED, stubbedSender);
assertTrue(sent);
verify(stubbedSender).sender(eq(USER_EMAIL), contains("ProActive Job 123890 : Job running to finished"), contains("Status: Finished"));
verifyNoMoreInteractions(stubbedSender);
}
use of org.ow2.proactive.scheduler.job.JobIdImpl in project scheduling by ow2-proactive.
the class JobEmailNotificationTest method testJobSubmitted.
@Test
public void testJobSubmitted() throws Exception {
InternalJob job = createJob(USER_EMAIL);
job.setId(new JobIdImpl(123890, job.getName()));
job.setStatus(JobStatus.PENDING);
Map<String, String> genericInfo = job.getGenericInformation();
genericInfo.put("NOTIFICATION_EVENTS", "Job submitted");
job.setGenericInformation(genericInfo);
boolean sent = sendNotification(job, SchedulerEvent.JOB_SUBMITTED, stubbedSender);
assertTrue(sent);
verify(stubbedSender).sender(eq(USER_EMAIL), contains("ProActive Job 123890 : Job submitted"), contains("Status: Pending"));
verifyNoMoreInteractions(stubbedSender);
}
Aggregations