Skip to content
Permalink
Browse files
BATCHEE-55 ensuring jobparameters are provisionned for getJobExecutio…
…ns()
  • Loading branch information
rmannibucau committed Nov 18, 2014
1 parent a3d42dd commit 1ea6089be687a786b468b547706442781ec50fc6
Showing 1 changed file with 10 additions and 0 deletions.
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.test.substitution;

import org.apache.batchee.container.impl.JobInstanceImpl;
import org.apache.batchee.container.services.persistence.jpa.domain.PropertyHelper;
import org.apache.batchee.util.Batches;
import org.testng.annotations.Test;
@@ -32,6 +33,7 @@
import javax.batch.operations.JobOperator;
import javax.batch.runtime.BatchRuntime;
import javax.batch.runtime.BatchStatus;
import javax.batch.runtime.JobExecution;
import javax.batch.runtime.Metric;
import javax.batch.runtime.StepExecution;
import javax.batch.runtime.context.JobContext;
@@ -47,6 +49,8 @@
import java.util.concurrent.CopyOnWriteArrayList;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;

public class PartitionPropertySubstitutionTest {

@@ -66,6 +70,12 @@ public void testPartitionPropertyResolverForCollector() throws Exception {
StepExecution stepExecution = op.getStepExecutions(id).iterator().next();

assertEquals(op.getJobExecution(id).getBatchStatus(), BatchStatus.COMPLETED);
assertNotNull(op.getJobExecution(id).getJobParameters());
assertEquals(jobParams, op.getJobExecution(id).getJobParameters());
for (final JobExecution exec: op.getJobExecutions(new JobInstanceImpl(id))) {
assertNotNull(exec.getJobParameters());
assertEquals(jobParams, exec.getJobParameters());
}

ArrayList<String> data = (ArrayList<String>)stepExecution.getPersistentUserData();

0 comments on commit 1ea6089

Please sign in to comment.