BATCH-1920 - Corrected pom and removed unused reference to JdbcTemplate

This commit is contained in:
Michael Minella
2012-12-18 13:46:10 -06:00
parent 96f870af4f
commit 95ccb1a229
3 changed files with 4 additions and 15 deletions

View File

@@ -2,18 +2,15 @@ package org.springframework.batch.sample;
import static org.junit.Assert.assertTrue;
import javax.sql.DataSource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.core.explore.JobExplorer;
import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
/**
* Run the job to read from the "test.inbound" queue, process the messages and write them to the "test.outbound" queue:
* mvn -q exec:java -Dexec.mainClass="org.springframework.batch.core.launch.support.CommandLineJobRunner" \
* -Dexec.arguments="classpath*:/META-INF/spring/jobs/amqp/amqp-example-job.xml,amqp-example-job"
@@ -25,21 +22,14 @@ public class AMQPJobFunctionalTests {
@Autowired
private JobLauncherTestUtils jobLauncherTestUtils;
private SimpleJdbcTemplate simpleJdbcTemplate;
@Autowired
private JobExplorer jobExplorer;
@Autowired
public void setDataSource(DataSource dataSource) {
this.simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource);
}
@Test
public void testLaunchJob() throws Exception {
jobLauncherTestUtils.launchJob();
int count = jobExplorer.getJobInstances("amqp-example-job", 0, 1).size();
assertTrue(count > 0);