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
@@ -24,7 +24,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
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.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
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.StepExecutionEvent;
|
||||
import org.springframework.cloud.task.configuration.EnableTask;
|
||||
@@ -64,9 +62,6 @@ public class EventJobExecutionTests {
|
||||
private JobParameters jobParameters;
|
||||
private JobInstance jobInstance;
|
||||
|
||||
@ClassRule
|
||||
public static RabbitTestSupport rabbitTestSupport = new RabbitTestSupport();
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
jobInstance = new JobInstance(JOB_INSTANCE_ID, JOB_NAME);
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
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.stream.annotation.Bindings;
|
||||
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.util.TaskLauncherSinkApplication;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@@ -57,9 +55,6 @@ public class TaskLauncherSinkTests {
|
||||
|
||||
private Map<String, String> properties;
|
||||
|
||||
@ClassRule
|
||||
public static RabbitTestSupport rabbitTestSupport = new RabbitTestSupport();
|
||||
|
||||
private final static String DEFAULT_STATUS = "test_status";
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -15,13 +15,11 @@
|
||||
*/
|
||||
package org.springframework.cloud.task.listener;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
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.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -31,12 +29,10 @@ import static org.junit.Assert.assertNotNull;
|
||||
/**
|
||||
* @author Michael Minella
|
||||
* @author Ilayaperumal Gopinathan
|
||||
* @author Glenn Renfro
|
||||
*/
|
||||
public class TaskEventTests {
|
||||
|
||||
@Rule
|
||||
public RabbitTestSupport rabbitTestSupport = new RabbitTestSupport();
|
||||
|
||||
private static final String TASK_NAME = "taskEventTest";
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user