Fix Redis modules for proper dependencies
According `testcontainers-spring-boot` project we have to use now a `spring-cloud-starter-bootstrap` dependency to make it compatible with Spring Boot `2.4.x` or higher: https://github.com/Playtika/testcontainers-spring-boot#how-to-use
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<spring-cloud-starters.version>2.2.0.RELEASE</spring-cloud-starters.version>
|
||||
<embedded-redis.version>1.85</embedded-redis.version>
|
||||
<spring-cloud-starters.version>3.0.3</spring-cloud-starters.version>
|
||||
<embedded-redis.version>2.0.9</embedded-redis.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -45,7 +45,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter</artifactId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
<version>${spring-cloud-starters.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.springframework.cloud.stream.app.sink.redis;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
@@ -40,12 +39,12 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* @author Soby Chacko
|
||||
* @author Artem Bilan
|
||||
*/
|
||||
public class RedisSinkTests {
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testRedisSink() throws Exception {
|
||||
public void testRedisSink() {
|
||||
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
TestChannelBinderConfiguration
|
||||
.getCompleteConfiguration(RedisSinkTestApplication.class))
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter</artifactId>-->
|
||||
<!-- <version>${spring-cloud-starters.version}</version>-->
|
||||
<!-- <scope>test</scope>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
<version>${spring-cloud-starters.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ import org.springframework.messaging.MessageHandler;
|
||||
public class RedisConsumerConfiguration {
|
||||
|
||||
@Bean
|
||||
public Consumer<Message<?>> redisConsumer() {
|
||||
return redisConsumerMessageHandler(null, null)::handleMessage;
|
||||
public Consumer<Message<?>> redisConsumer(MessageHandler redisConsumerMessageHandler) {
|
||||
return redisConsumerMessageHandler::handleMessage;
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.test.annotation.DirtiesContext;
|
||||
|
||||
/**
|
||||
* @author Soby Chacko
|
||||
* @author Artem Bilan
|
||||
*/
|
||||
@SpringBootTest
|
||||
@DirtiesContext
|
||||
|
||||
@@ -36,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Gary Russell
|
||||
*/
|
||||
@TestPropertySource(properties = "redis.consumer.key = foo")
|
||||
@Disabled
|
||||
public class RedisConsumerKeyTests extends AbstractRedisConsumerTests {
|
||||
|
||||
@Test
|
||||
|
||||
@@ -31,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Soby Chacko
|
||||
*/
|
||||
@TestPropertySource(properties = "redis.consumer.queue = test-queue")
|
||||
@Disabled
|
||||
public class RedisConsumerQueueTests extends AbstractRedisConsumerTests {
|
||||
|
||||
@Test
|
||||
|
||||
@@ -43,7 +43,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Soby Chacko
|
||||
*/
|
||||
@TestPropertySource(properties = "redis.consumer.topic = foo-topic")
|
||||
@Disabled
|
||||
public class RedisConsumerTopicTests extends AbstractRedisConsumerTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user