RESOLVED - issue BATCH-1528: Namespace context partition element requires bean with name "transactionManager"
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2006-2007 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.configuration.xml;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.core.BatchStatus;
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
import org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
@ContextConfiguration
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
public class PartitionStepWithNonDefaultTransactionManagerParserTests {
|
||||
|
||||
@Autowired
|
||||
private Job job;
|
||||
|
||||
@Autowired
|
||||
private JobRepository jobRepository;
|
||||
|
||||
@Autowired
|
||||
private MapJobRepositoryFactoryBean mapJobRepositoryFactoryBean;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
mapJobRepositoryFactoryBean.clear();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultHandlerStep() throws Exception {
|
||||
assertNotNull(job);
|
||||
JobExecution jobExecution = jobRepository.createJobExecution(job.getName(), new JobParameters());
|
||||
job.execute(jobExecution);
|
||||
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -957,7 +957,7 @@ public class FaultTolerantStepFactoryBeanTests {
|
||||
* expected: false; default classification
|
||||
*/
|
||||
@Test
|
||||
public void testFatalSubset_unclassified() throws Exception {
|
||||
public void testFatalSubsetUnclassified() throws Exception {
|
||||
assertFalse(getFatalSubsetSkipPolicy().shouldSkip(new RuntimeException(), 0));
|
||||
}
|
||||
|
||||
@@ -967,7 +967,7 @@ public class FaultTolerantStepFactoryBeanTests {
|
||||
* expected: true
|
||||
*/
|
||||
@Test
|
||||
public void testFatalSubset_skippable() throws Exception {
|
||||
public void testFatalSubsetSkippable() throws Exception {
|
||||
assertTrue(getFatalSubsetSkipPolicy().shouldSkip(new WriterNotOpenException(""), 0));
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ public class FaultTolerantStepFactoryBeanTests {
|
||||
* expected: false
|
||||
*/
|
||||
@Test
|
||||
public void testFatalSubset_fatal() throws Exception {
|
||||
public void testFatalSubsetFatal() throws Exception {
|
||||
assertFalse(getFatalSubsetSkipPolicy().shouldSkip(new WriteFailedException(""), 0));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user