Search in sources :

Example 16 with JobExecution

use of javax.batch.runtime.JobExecution in project wildfly by wildfly.

the class FlowTestCase method flow.

@Test
public void flow() throws Exception {
    final UrlBuilder builder = UrlBuilder.of(url, "start");
    builder.addParameter(StartBatchServlet.JOB_XML_PARAMETER, "flow");
    builder.addParameter("job-param", "job-param");
    final String result = performCall(builder.build());
    final JobExecution jobExecution = JobExecutionMarshaller.unmarshall(result);
    Assert.assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
}
Also used : JobExecution(javax.batch.runtime.JobExecution) Test(org.junit.Test)

Example 17 with JobExecution

use of javax.batch.runtime.JobExecution in project wildfly by wildfly.

the class BatchTransactionTimeoutTestCase method executeJob.

private String executeJob(@ArquillianResource URL url, int timeout) throws ExecutionException, IOException, TimeoutException {
    final UrlBuilder builder = UrlBuilder.of(url, "start");
    builder.addParameter(StartBatchServlet.JOB_XML_PARAMETER, "timeout-job");
    builder.addParameter("job.timeout", timeout);
    final String result = performCall(builder.build(), 20);
    final JobExecution jobExecution = JobExecutionMarshaller.unmarshall(result);
    return jobExecution.getExitStatus();
}
Also used : JobExecution(javax.batch.runtime.JobExecution)

Aggregations

JobExecution (javax.batch.runtime.JobExecution)17 Test (org.junit.Test)12 JobOperator (javax.batch.operations.JobOperator)10 Properties (java.util.Properties)6 ModelNode (org.jboss.dmr.ModelNode)5 ArrayList (java.util.ArrayList)3 StepExecution (javax.batch.runtime.StepExecution)2 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)2 List (java.util.List)1 NoSuchJobExecutionException (javax.batch.operations.NoSuchJobExecutionException)1 JobInstance (javax.batch.runtime.JobInstance)1