Add @Transactional to SimpleJobRepostory.stop()
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package org.springframework.batch.sample;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.springframework.batch.core.BatchStatus.STARTED;
|
||||
import static org.springframework.batch.core.BatchStatus.STOPPED;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -11,7 +15,6 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import static org.springframework.batch.core.BatchStatus.*;
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
import org.springframework.batch.core.configuration.ListableJobRegistry;
|
||||
@@ -22,7 +25,7 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration()
|
||||
@ContextConfiguration
|
||||
public class JobOperatorFunctionalTests {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(JobOperatorFunctionalTests.class);
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx">
|
||||
|
||||
|
||||
<import resource="classpath:/simple-job-launcher-context.xml" />
|
||||
<import resource="classpath:/jobs/infiniteLoopJob.xml" />
|
||||
|
||||
<tx:annotation-driven/>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user