use of org.apache.airavata.gfac.core.monitor.JobStatusResult in project airavata by apache.
the class UGEEmailParser method parseEmail.
@Override
public JobStatusResult parseEmail(Message message) throws MessagingException, AiravataException {
JobStatusResult jobStatusResult = new JobStatusResult();
parseContent(message, jobStatusResult);
return jobStatusResult;
}
use of org.apache.airavata.gfac.core.monitor.JobStatusResult in project airavata by apache.
the class PBSEmailParserTest method parseContent_non_ASCII.
@Test
public void parseContent_non_ASCII() throws Exception {
PBSEmailParser parser = new PBSEmailParser();
// test for non ascii contents
String nonascii = "PBS Job Id: 33.torque_server\n" + "Job Name: A2085606929\n" + "Exec host: compute-0/0-9\n" + "Begun execution";
JobStatusResult jsr = new JobStatusResult();
parser.parseContent(nonascii, jsr);
Assert.assertNotNull(jsr.getJobId());
Assert.assertEquals("33.torque_server", jsr.getJobId());
Assert.assertEquals("A2085606929", jsr.getJobName());
Assert.assertEquals(JobState.ACTIVE, jsr.getState());
}
Aggregations