OPEN - issue BATCH-170: Concurrent modification of StepExecution when running an asynchrounous step operation

http://opensource.atlassian.com/projects/spring/browse/BATCH-170

Synchronized and added OptimisticLockingException to SqlStepDao.  The parallel job now runs cleanly (tried it a few times).
This commit is contained in:
dsyer
2007-12-19 13:06:31 +00:00
parent 7f71dc55ce
commit 37696b45f4
21 changed files with 431 additions and 297 deletions

View File

@@ -111,11 +111,11 @@ public class StepExecutionTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.core.domain.StepExecution#incrementRollbackCount()}.
* {@link org.springframework.batch.core.domain.StepExecution#rollback()}.
*/
public void testIncrementRollbackCount() {
int before = execution.getRollbackCount().intValue();
execution.incrementRollbackCount();
execution.rollback();
int after = execution.getRollbackCount().intValue();
assertEquals(before + 1, after);
}