From 4ee9d21a579a15de9490de7b5070cc03d8ba2e55 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Wed, 28 Sep 2022 09:15:33 -0400 Subject: [PATCH] Upgrade stream-client, Docker Image --- build.gradle | 2 +- .../stream/support/AbstractIntegrationTests.java | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 01125455..80dc2cb1 100644 --- a/build.gradle +++ b/build.gradle @@ -58,7 +58,7 @@ ext { micrometerVersion = '1.10.0-M6' micrometerTracingVersion = '1.0.0-M8' mockitoVersion = '4.8.0' - rabbitmqStreamVersion = '0.7.0' + rabbitmqStreamVersion = '0.8.0' rabbitmqVersion = project.hasProperty('rabbitmqVersion') ? project.rabbitmqVersion : '5.16.0' rabbitmqHttpClientVersion = '3.12.1' reactorVersion = '2022.0.0-M6' diff --git a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/support/AbstractIntegrationTests.java b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/support/AbstractIntegrationTests.java index e0c7f04d..f38b685c 100644 --- a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/support/AbstractIntegrationTests.java +++ b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/support/AbstractIntegrationTests.java @@ -18,8 +18,9 @@ package org.springframework.rabbit.stream.support; import java.time.Duration; +import org.junit.jupiter.api.AfterAll; import org.testcontainers.containers.GenericContainer; -import org.testcontainers.utility.DockerImageName; +import org.testcontainers.containers.RabbitMQContainer; /** * @author Gary Russell @@ -33,13 +34,14 @@ public abstract class AbstractIntegrationTests { static { if (System.getProperty("spring.rabbit.use.local.server") == null && System.getenv("SPRING_RABBIT_USE_LOCAL_SERVER") == null) { - String image = "pivotalrabbitmq/rabbitmq-stream"; + String image = "rabbitmq:3.11"; String cache = System.getenv().get("IMAGE_CACHE"); if (cache != null) { image = cache + image; } - RABBITMQ = new GenericContainer<>(DockerImageName.parse(image)) + RABBITMQ = new RabbitMQContainer(image) .withExposedPorts(5672, 15672, 5552) + .withPluginsEnabled("rabbitmq_stream", "rabbitmq_management") .withStartupTimeout(Duration.ofMinutes(2)); RABBITMQ.start(); } @@ -60,4 +62,9 @@ public abstract class AbstractIntegrationTests { return RABBITMQ != null ? RABBITMQ.getMappedPort(5552) : 5552; } + @AfterAll + static void shutDown() { + RABBITMQ.close(); + } + }