Revert to thread safe but less robust in the face of transaction exceptions MapStepExecutionDao

This commit is contained in:
dsyer
2010-09-11 08:04:58 +00:00
parent a53acbd6c9
commit c503a19992
8 changed files with 170 additions and 72 deletions

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.test;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import org.springframework.batch.core.test.step.FaultTolerantStepFactoryBeanIntegrationTests;
import org.springframework.batch.core.test.step.FaultTolerantStepFactoryBeanRollbackIntegrationTests;
/**
* A test suite that is ignored, but can be resurrected to help debug ordering
* issues in tests.
*
* @author Dave Syer
*
*/
@RunWith(Suite.class)
@SuiteClasses(value = { FaultTolerantStepFactoryBeanIntegrationTests.class, FaultTolerantStepFactoryBeanRollbackIntegrationTests.class })
@Ignore
public class IgnoredTestSuite {
}

View File

@@ -44,7 +44,7 @@ import org.springframework.util.Assert;
*/
@ContextConfiguration(locations = "/simple-job-launcher-context.xml")
@RunWith(SpringJUnit4ClassRunner.class)
public class FaultTolerantStepFactoryBeanTests {
public class FaultTolerantStepFactoryBeanIntegrationTests {
private static final int MAX_COUNT = 1000;
@@ -90,6 +90,8 @@ public class FaultTolerantStepFactoryBeanTests {
taskExecutor.setQueueCapacity(0);
taskExecutor.afterPropertiesSet();
factory.setTaskExecutor(taskExecutor);
SimpleJdbcTestUtils.deleteFromTables(new SimpleJdbcTemplate(dataSource), "ERROR_LOG");
}

View File

@@ -47,7 +47,7 @@ import org.springframework.util.Assert;
*/
@ContextConfiguration(locations = "/simple-job-launcher-context.xml")
@RunWith(SpringJUnit4ClassRunner.class)
public class FaultTolerantStepFactoryBeanRollbackTests {
public class FaultTolerantStepFactoryBeanRollbackIntegrationTests {
private static final int MAX_COUNT = 1000;
@@ -98,6 +98,8 @@ public class FaultTolerantStepFactoryBeanRollbackTests {
factory.setSkippableExceptionClasses(getExceptionMap(Exception.class));
SimpleJdbcTestUtils.deleteFromTables(new SimpleJdbcTemplate(dataSource), "ERROR_LOG");
}
@Test