You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@batchee.apache.org by st...@apache.org on 2015/11/06 13:57:29 UTC
[2/2] incubator-batchee git commit: BATCHEE-66 improve checkpoint
test and fix service names
BATCHEE-66 improve checkpoint test and fix service names
Project: http://git-wip-us.apache.org/repos/asf/incubator-batchee/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-batchee/commit/1a0259c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-batchee/tree/1a0259c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-batchee/diff/1a0259c6
Branch: refs/heads/master
Commit: 1a0259c6f0cca160697325e70f18e0be8fa34ab3
Parents: 16c309b
Author: Mark Struberg <st...@apache.org>
Authored: Fri Nov 6 13:30:38 2015 +0100
Committer: Mark Struberg <st...@apache.org>
Committed: Fri Nov 6 13:30:38 2015 +0100
----------------------------------------------------------------------
.../DefaultDataRepresentationServiceTest.java | 18 ++++++++++++++++++
jbatch/src/test/resources/batchee.properties | 4 ++--
2 files changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/1a0259c6/jbatch/src/test/java/org/apache/batchee/test/data/DefaultDataRepresentationServiceTest.java
----------------------------------------------------------------------
diff --git a/jbatch/src/test/java/org/apache/batchee/test/data/DefaultDataRepresentationServiceTest.java b/jbatch/src/test/java/org/apache/batchee/test/data/DefaultDataRepresentationServiceTest.java
index 4fd380f..a60f554 100644
--- a/jbatch/src/test/java/org/apache/batchee/test/data/DefaultDataRepresentationServiceTest.java
+++ b/jbatch/src/test/java/org/apache/batchee/test/data/DefaultDataRepresentationServiceTest.java
@@ -155,6 +155,10 @@ public class DefaultDataRepresentationServiceTest {
assertEquals(1, steps.size());
final StepExecution exec = steps.iterator().next();
Assert.assertEquals(BatchStatus.FAILED, exec.getBatchStatus());
+
+ // now try to restart the batch again
+ long restartId = op.restart(id, null);
+ Batches.waitForEnd(op, restartId);
}
@@ -191,6 +195,12 @@ public class DefaultDataRepresentationServiceTest {
private int counter = 0;
+ @Override
+ public void open(Serializable checkpoint) throws Exception {
+ if (checkpoint != null) {
+ counter = (Integer)checkpoint;
+ }
+ }
@Override
public Object readItem() throws Exception {
@@ -208,6 +218,14 @@ public class DefaultDataRepresentationServiceTest {
private Integer lastCount = null;
@Override
+ public void open(Serializable checkpoint) throws Exception {
+ if (checkpoint != null) {
+ lastCount = (Integer)checkpoint + 10;
+ }
+ }
+
+
+ @Override
public void writeItems(List<Object> items) throws Exception {
lastCount = (Integer) items.get(0);
if (lastCount.equals(2)) {
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/1a0259c6/jbatch/src/test/resources/batchee.properties
----------------------------------------------------------------------
diff --git a/jbatch/src/test/resources/batchee.properties b/jbatch/src/test/resources/batchee.properties
index 8030843..59ed4bf 100644
--- a/jbatch/src/test/resources/batchee.properties
+++ b/jbatch/src/test/resources/batchee.properties
@@ -22,8 +22,8 @@ BatchThreadPoolService = org.apache.batchee.container.services.executor.BoundedT
# as main sample. To do so just uncomment this line. If we consider it as dangerous we could activate it
# in *another* execution of TCKs (surefire) by default.
#
-# PersistenceManagerService = org.apache.batchee.container.services.persistence.JDBCPersistenceManager
+# PersistenceManagerService = org.apache.batchee.container.services.persistence.JDBCPersistenceManagerService
# persistence.database.jndi = jdbc/batchee
# to test jpa implementation - using defaults = resource local on a persistence unit named batchee
-# PersistenceManagerService = org.apache.batchee.container.services.persistence.JPAPersistenceService
+# PersistenceManagerService = org.apache.batchee.container.services.persistence.JPAPersistenceManagerService