From 95ccb1a229dae3ab59c817c1baba4efaa5334789 Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Tue, 18 Dec 2012 13:46:10 -0600 Subject: [PATCH] BATCH-1920 - Corrected pom and removed unused reference to JdbcTemplate --- spring-batch-samples/pom.xml | 2 +- .../src/main/resources/jobs/amqp-example-job.xml | 1 - .../batch/sample/AMQPJobFunctionalTests.java | 16 +++------------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/spring-batch-samples/pom.xml b/spring-batch-samples/pom.xml index 104dfc7fa..d98df5530 100644 --- a/spring-batch-samples/pom.xml +++ b/spring-batch-samples/pom.xml @@ -20,7 +20,7 @@ com.vmware.sqlfire sqlfireclient - 1.0.3 + true org.springframework.batch diff --git a/spring-batch-samples/src/main/resources/jobs/amqp-example-job.xml b/spring-batch-samples/src/main/resources/jobs/amqp-example-job.xml index 3c5b7ffdc..b8dba281c 100644 --- a/spring-batch-samples/src/main/resources/jobs/amqp-example-job.xml +++ b/spring-batch-samples/src/main/resources/jobs/amqp-example-job.xml @@ -9,7 +9,6 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> - diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/AMQPJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/AMQPJobFunctionalTests.java index 773a8eeb1..c1a10af1c 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/AMQPJobFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/AMQPJobFunctionalTests.java @@ -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);