Upgrade stream-client, Docker Image

This commit is contained in:
Gary Russell
2022-09-28 09:15:33 -04:00
parent 732f0da284
commit 4ee9d21a57
2 changed files with 11 additions and 4 deletions

View File

@@ -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'

View File

@@ -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();
}
}