Updated dependencies and refactored code.
* Updated spring cloud streams to 1.1.0.RELEASE * Updated cloud dependencies parent to 1.2.1.RELEASE * Updated samples to 1.4.1 * Updated Tests to take advantage of 1.4 boot test annotations * Removed @Bindings as they are deprecated * Updated BatchApplication test to pass. Boot no longer logs environment values. So count was reduced from 3 to 1 resolves #218, #221 renamed spring-cloud-task-starter to spring-cloud-starter-task
This commit is contained in:
committed by
Michael Minella
parent
441bbfe492
commit
d657b22b79
6
pom.xml
6
pom.xml
@@ -125,16 +125,16 @@
|
|||||||
<module>spring-cloud-task-docs</module>
|
<module>spring-cloud-task-docs</module>
|
||||||
<module>spring-cloud-task-batch</module>
|
<module>spring-cloud-task-batch</module>
|
||||||
<module>spring-cloud-task-stream</module>
|
<module>spring-cloud-task-stream</module>
|
||||||
<module>spring-cloud-task-starter</module>
|
<module>spring-cloud-starter-task</module>
|
||||||
<module>spring-cloud-task-samples</module>
|
<module>spring-cloud-task-samples</module>
|
||||||
<module>spring-cloud-task-integration-tests</module>
|
<module>spring-cloud-task-integration-tests</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<spring-cloud-stream.version>1.0.2.RELEASE</spring-cloud-stream.version>
|
<spring-cloud-stream.version>1.1.0.RELEASE</spring-cloud-stream.version>
|
||||||
<spring-cloud-deployer-spi.version>1.0.2.RELEASE</spring-cloud-deployer-spi.version>
|
<spring-cloud-deployer-spi.version>1.0.2.RELEASE</spring-cloud-deployer-spi.version>
|
||||||
<spring-cloud-deployer-local.version>1.0.2.RELEASE</spring-cloud-deployer-local.version>
|
<spring-cloud-deployer-local.version>1.0.2.RELEASE</spring-cloud-deployer-local.version>
|
||||||
<spring-cloud-stream-binder-rabbit.version>1.0.2.RELEASE</spring-cloud-stream-binder-rabbit.version>
|
<spring-cloud-stream-binder-rabbit.version>1.1.0.RELEASE</spring-cloud-stream-binder-rabbit.version>
|
||||||
<spring-cloud-deployer-resource-support.version>1.0.2.RELEASE</spring-cloud-deployer-resource-support.version>
|
<spring-cloud-deployer-resource-support.version>1.0.2.RELEASE</spring-cloud-deployer-resource-support.version>
|
||||||
<spring-cloud-deployer-resource-maven.version>1.0.2.RELEASE</spring-cloud-deployer-resource-maven.version>
|
<spring-cloud-deployer-resource-maven.version>1.0.2.RELEASE</spring-cloud-deployer-resource-maven.version>
|
||||||
<spring-batch.version>3.0.7.RELEASE</spring-batch.version>
|
<spring-batch.version>3.0.7.RELEASE</spring-batch.version>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>spring-cloud-task-starter</artifactId>
|
<artifactId>spring-cloud-starter-task</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>Spring Cloud Task Starter</name>
|
<name>Spring Cloud Task Starter</name>
|
||||||
<description>Spring Boot starter for Spring Cloud Task</description>
|
<description>Spring Boot starter for Spring Cloud Task</description>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<version>1.1.1.RELEASE</version>
|
<version>1.2.1.RELEASE</version>
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-task-starter</artifactId>
|
<artifactId>spring-cloud-starter-task</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -44,6 +44,12 @@
|
|||||||
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-stream-binder-rabbit-test-support</artifactId>
|
||||||
|
<version>${spring-cloud-stream-binder-rabbit.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.batch</groupId>
|
<groupId>org.springframework.batch</groupId>
|
||||||
<artifactId>spring-batch-core</artifactId>
|
<artifactId>spring-batch-core</artifactId>
|
||||||
|
|||||||
@@ -34,9 +34,8 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||||||
import org.springframework.cloud.deployer.spi.local.LocalDeployerProperties;
|
import org.springframework.cloud.deployer.spi.local.LocalDeployerProperties;
|
||||||
import org.springframework.cloud.deployer.spi.local.LocalTaskLauncher;
|
import org.springframework.cloud.deployer.spi.local.LocalTaskLauncher;
|
||||||
import org.springframework.cloud.deployer.spi.task.TaskLauncher;
|
import org.springframework.cloud.deployer.spi.task.TaskLauncher;
|
||||||
import org.springframework.cloud.stream.annotation.Bindings;
|
import org.springframework.cloud.stream.binder.test.junit.rabbit.RabbitTestSupport;
|
||||||
import org.springframework.cloud.stream.messaging.Sink;
|
import org.springframework.cloud.stream.messaging.Sink;
|
||||||
import org.springframework.cloud.stream.test.junit.rabbit.RabbitTestSupport;
|
|
||||||
import org.springframework.cloud.task.launcher.util.TaskLauncherSinkApplication;
|
import org.springframework.cloud.task.launcher.util.TaskLauncherSinkApplication;
|
||||||
import org.springframework.cloud.task.repository.TaskExecution;
|
import org.springframework.cloud.task.repository.TaskExecution;
|
||||||
import org.springframework.cloud.task.repository.TaskExplorer;
|
import org.springframework.cloud.task.repository.TaskExplorer;
|
||||||
@@ -84,7 +83,6 @@ public class TaskLauncherSinkTests {
|
|||||||
public static RabbitTestSupport rabbitTestSupport = new RabbitTestSupport();
|
public static RabbitTestSupport rabbitTestSupport = new RabbitTestSupport();
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@Bindings(TaskLauncherSink.class)
|
|
||||||
private Sink sink;
|
private Sink sink;
|
||||||
|
|
||||||
private DataSource dataSource;
|
private DataSource dataSource;
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|||||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||||
import org.springframework.cloud.stream.annotation.StreamListener;
|
import org.springframework.cloud.stream.annotation.StreamListener;
|
||||||
|
import org.springframework.cloud.stream.binder.test.junit.rabbit.RabbitTestSupport;
|
||||||
import org.springframework.cloud.stream.messaging.Sink;
|
import org.springframework.cloud.stream.messaging.Sink;
|
||||||
import org.springframework.cloud.stream.test.junit.rabbit.RabbitTestSupport;
|
|
||||||
import org.springframework.cloud.task.batch.listener.BatchEventAutoConfiguration;
|
import org.springframework.cloud.task.batch.listener.BatchEventAutoConfiguration;
|
||||||
import org.springframework.cloud.task.batch.listener.support.JobExecutionEvent;
|
import org.springframework.cloud.task.batch.listener.support.JobExecutionEvent;
|
||||||
import org.springframework.cloud.task.batch.listener.support.StepExecutionEvent;
|
import org.springframework.cloud.task.batch.listener.support.StepExecutionEvent;
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||||
import org.springframework.cloud.stream.annotation.StreamListener;
|
import org.springframework.cloud.stream.annotation.StreamListener;
|
||||||
import org.springframework.cloud.stream.binder.rabbit.config.RabbitServiceAutoConfiguration;
|
import org.springframework.cloud.stream.binder.rabbit.config.RabbitServiceAutoConfiguration;
|
||||||
|
import org.springframework.cloud.stream.binder.test.junit.rabbit.RabbitTestSupport;
|
||||||
import org.springframework.cloud.stream.messaging.Sink;
|
import org.springframework.cloud.stream.messaging.Sink;
|
||||||
import org.springframework.cloud.stream.test.junit.rabbit.RabbitTestSupport;
|
|
||||||
import org.springframework.cloud.task.configuration.EnableTask;
|
import org.springframework.cloud.task.configuration.EnableTask;
|
||||||
import org.springframework.cloud.task.repository.TaskExecution;
|
import org.springframework.cloud.task.repository.TaskExecution;
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>1.4.0.RELEASE</version>
|
<version>1.4.1.RELEASE</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -51,18 +51,24 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
||||||
<version>1.0.2.RELEASE</version>
|
<version>1.1.0.RELEASE</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-stream-test-support-internal</artifactId>
|
<artifactId>spring-cloud-stream-binder-rabbit-test-support</artifactId>
|
||||||
<version>1.0.2.RELEASE</version>
|
<version>1.1.0.RELEASE</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-task-starter</artifactId>
|
<artifactId>spring-cloud-stream-test-support-internal</artifactId>
|
||||||
|
<version>1.1.0.RELEASE</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-task</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hsqldb</groupId>
|
<groupId>org.hsqldb</groupId>
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|||||||
import org.springframework.boot.test.rule.OutputCapture;
|
import org.springframework.boot.test.rule.OutputCapture;
|
||||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||||
import org.springframework.cloud.stream.annotation.StreamListener;
|
import org.springframework.cloud.stream.annotation.StreamListener;
|
||||||
|
import org.springframework.cloud.stream.binder.test.junit.rabbit.RabbitTestSupport;
|
||||||
import org.springframework.cloud.stream.messaging.Sink;
|
import org.springframework.cloud.stream.messaging.Sink;
|
||||||
import org.springframework.cloud.stream.test.junit.rabbit.RabbitTestSupport;
|
|
||||||
import org.springframework.cloud.task.batch.listener.support.JobExecutionEvent;
|
import org.springframework.cloud.task.batch.listener.support.JobExecutionEvent;
|
||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>1.4.0.RELEASE</version>
|
<version>1.4.1.RELEASE</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-task-starter</artifactId>
|
<artifactId>spring-cloud-starter-task</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class BatchJobApplicationTests {
|
|||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
assertEquals("The number of task titles did not match expected: ", 3, count);
|
assertEquals("The number of task titles did not match expected: ", 1, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>1.4.0.RELEASE</version>
|
<version>1.4.1.RELEASE</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-task-starter</artifactId>
|
<artifactId>spring-cloud-starter-task</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>1.4.0.RELEASE</version>
|
<version>1.4.1.RELEASE</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -42,13 +42,13 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-task-starter</artifactId>
|
<artifactId>spring-cloud-starter-task</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
||||||
<version>1.0.2.RELEASE</version>
|
<version>1.1.0.RELEASE</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>1.4.0.RELEASE</version>
|
<version>1.4.1.RELEASE</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -41,12 +41,12 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-task-starter</artifactId>
|
<artifactId>spring-cloud-starter-task</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
||||||
<version>1.0.2.RELEASE</version>
|
<version>1.1.0.RELEASE</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-stream-test-support</artifactId>
|
<artifactId>spring-cloud-stream-test-support</artifactId>
|
||||||
<version>1.0.2.RELEASE</version>
|
<version>1.1.0.RELEASE</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>1.4.0.RELEASE</version>
|
<version>1.4.1.RELEASE</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -46,18 +46,18 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-task-starter</artifactId>
|
<artifactId>spring-cloud-starter-task</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
||||||
<version>1.0.2.RELEASE</version>
|
<version>1.1.0.RELEASE</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-stream-test-support</artifactId>
|
<artifactId>spring-cloud-stream-test-support</artifactId>
|
||||||
<version>1.0.2.RELEASE</version>
|
<version>1.1.0.RELEASE</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>1.4.0.RELEASE</version>
|
<version>1.4.1.RELEASE</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-task-starter</artifactId>
|
<artifactId>spring-cloud-starter-task</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.ClassRule;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.springframework.batch.core.JobExecution;
|
import org.springframework.batch.core.JobExecution;
|
||||||
@@ -36,7 +35,6 @@ import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
|||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||||
import org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration;
|
import org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration;
|
||||||
import org.springframework.cloud.stream.test.junit.rabbit.RabbitTestSupport;
|
|
||||||
import org.springframework.cloud.task.batch.listener.support.JobExecutionEvent;
|
import org.springframework.cloud.task.batch.listener.support.JobExecutionEvent;
|
||||||
import org.springframework.cloud.task.batch.listener.support.StepExecutionEvent;
|
import org.springframework.cloud.task.batch.listener.support.StepExecutionEvent;
|
||||||
import org.springframework.cloud.task.configuration.EnableTask;
|
import org.springframework.cloud.task.configuration.EnableTask;
|
||||||
@@ -64,9 +62,6 @@ public class EventJobExecutionTests {
|
|||||||
private JobParameters jobParameters;
|
private JobParameters jobParameters;
|
||||||
private JobInstance jobInstance;
|
private JobInstance jobInstance;
|
||||||
|
|
||||||
@ClassRule
|
|
||||||
public static RabbitTestSupport rabbitTestSupport = new RabbitTestSupport();
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() {
|
public void setup() {
|
||||||
jobInstance = new JobInstance(JOB_INSTANCE_ID, JOB_NAME);
|
jobInstance = new JobInstance(JOB_INSTANCE_ID, JOB_NAME);
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.ClassRule;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@@ -31,7 +30,6 @@ import org.springframework.boot.test.SpringApplicationConfiguration;
|
|||||||
import org.springframework.cloud.deployer.spi.task.LaunchState;
|
import org.springframework.cloud.deployer.spi.task.LaunchState;
|
||||||
import org.springframework.cloud.stream.annotation.Bindings;
|
import org.springframework.cloud.stream.annotation.Bindings;
|
||||||
import org.springframework.cloud.stream.messaging.Sink;
|
import org.springframework.cloud.stream.messaging.Sink;
|
||||||
import org.springframework.cloud.stream.test.junit.rabbit.RabbitTestSupport;
|
|
||||||
import org.springframework.cloud.task.launcher.configuration.TaskConfiguration;
|
import org.springframework.cloud.task.launcher.configuration.TaskConfiguration;
|
||||||
import org.springframework.cloud.task.launcher.util.TaskLauncherSinkApplication;
|
import org.springframework.cloud.task.launcher.util.TaskLauncherSinkApplication;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
@@ -57,9 +55,6 @@ public class TaskLauncherSinkTests {
|
|||||||
|
|
||||||
private Map<String, String> properties;
|
private Map<String, String> properties;
|
||||||
|
|
||||||
@ClassRule
|
|
||||||
public static RabbitTestSupport rabbitTestSupport = new RabbitTestSupport();
|
|
||||||
|
|
||||||
private final static String DEFAULT_STATUS = "test_status";
|
private final static String DEFAULT_STATUS = "test_status";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@@ -15,13 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
package org.springframework.cloud.task.listener;
|
package org.springframework.cloud.task.listener;
|
||||||
|
|
||||||
import org.junit.Rule;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||||
import org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration;
|
import org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration;
|
||||||
import org.springframework.cloud.stream.test.junit.rabbit.RabbitTestSupport;
|
|
||||||
import org.springframework.cloud.task.configuration.EnableTask;
|
import org.springframework.cloud.task.configuration.EnableTask;
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@@ -31,12 +29,10 @@ import static org.junit.Assert.assertNotNull;
|
|||||||
/**
|
/**
|
||||||
* @author Michael Minella
|
* @author Michael Minella
|
||||||
* @author Ilayaperumal Gopinathan
|
* @author Ilayaperumal Gopinathan
|
||||||
|
* @author Glenn Renfro
|
||||||
*/
|
*/
|
||||||
public class TaskEventTests {
|
public class TaskEventTests {
|
||||||
|
|
||||||
@Rule
|
|
||||||
public RabbitTestSupport rabbitTestSupport = new RabbitTestSupport();
|
|
||||||
|
|
||||||
private static final String TASK_NAME = "taskEventTest";
|
private static final String TASK_NAME = "taskEventTest";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user