Trying to make work the integration tests
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Tue, 31 Jan 2017 01:15:34 +0000 (02:15 +0100)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Tue, 31 Jan 2017 01:15:34 +0000 (02:15 +0100)
SpringJava/Kafka/SpringCloudStream/spring-stream-kafka-consumer/src/test/java/de/example/spring/kafka/ReceiverIntegrationTest.java
SpringJava/Kafka/SpringCloudStream/spring-stream-kafka-producer/src/test/java/de/example/spring/kafka/SenderIntegrationTest.java

index 9a01a2d..c89e565 100644 (file)
@@ -12,13 +12,14 @@ import org.mockito.ArgumentCaptor;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.mock.mockito.MockBean;
 import org.springframework.cloud.stream.messaging.Sink;
+import org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration;
 import org.springframework.messaging.Message;
 import org.springframework.messaging.support.GenericMessage;
 import org.springframework.test.annotation.DirtiesContext;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @RunWith(SpringJUnit4ClassRunner.class)
-@SpringBootTest(classes = { Receiver.class })
+@SpringBootTest(classes = { Receiver.class, TestSupportBinderAutoConfiguration.class })
 @DirtiesContext
 public class ReceiverIntegrationTest {
 
index d424fac..2b170b7 100644 (file)
@@ -10,12 +10,13 @@ import org.junit.runner.RunWith;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.cloud.stream.messaging.Source;
 import org.springframework.cloud.stream.test.binder.MessageCollector;
+import org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration;
 import org.springframework.messaging.Message;
 import org.springframework.test.annotation.DirtiesContext;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @RunWith(SpringJUnit4ClassRunner.class)
-@SpringBootTest(classes = { Sender.class })
+@SpringBootTest(classes = { Sender.class, TestSupportBinderAutoConfiguration.class })
 @DirtiesContext
 public class SenderIntegrationTest {