You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@batchee.apache.org by rm...@apache.org on 2014/11/18 09:01:05 UTC
incubator-batchee git commit: BATCHEE-55 ensuring jobparameters are
provisionned for getJobExecutions()
Repository: incubator-batchee
Updated Branches:
refs/heads/master a3d42ddbc -> 1ea6089be
BATCHEE-55 ensuring jobparameters are provisionned for getJobExecutions()
Project: http://git-wip-us.apache.org/repos/asf/incubator-batchee/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-batchee/commit/1ea6089b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-batchee/tree/1ea6089b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-batchee/diff/1ea6089b
Branch: refs/heads/master
Commit: 1ea6089be687a786b468b547706442781ec50fc6
Parents: a3d42dd
Author: Romain Manni-Bucau <rm...@apache.org>
Authored: Tue Nov 18 09:00:58 2014 +0100
Committer: Romain Manni-Bucau <rm...@apache.org>
Committed: Tue Nov 18 09:00:58 2014 +0100
----------------------------------------------------------------------
.../substitution/PartitionPropertySubstitutionTest.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/1ea6089b/jbatch/src/test/java/org/apache/batchee/test/substitution/PartitionPropertySubstitutionTest.java
----------------------------------------------------------------------
diff --git a/jbatch/src/test/java/org/apache/batchee/test/substitution/PartitionPropertySubstitutionTest.java b/jbatch/src/test/java/org/apache/batchee/test/substitution/PartitionPropertySubstitutionTest.java
index f0b1adc..b224c85 100644
--- a/jbatch/src/test/java/org/apache/batchee/test/substitution/PartitionPropertySubstitutionTest.java
+++ b/jbatch/src/test/java/org/apache/batchee/test/substitution/PartitionPropertySubstitutionTest.java
@@ -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.api.partition.PartitionPlanImpl;
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.Properties;
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 class PartitionPropertySubstitutionTest {
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();