From 0cce53331a5db1859fa051e6c0de5e4663f66da3 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Wed, 28 Sep 2022 12:14:24 -0400 Subject: [PATCH] Fix Stream TestContainer - do not close the container; used by other tests. --- .../stream/support/AbstractIntegrationTests.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 f38b685c..a8bf3cff 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 @@ -1,5 +1,5 @@ /* - * Copyright 2021 the original author or authors. + * Copyright 2021-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ package org.springframework.rabbit.stream.support; import java.time.Duration; -import org.junit.jupiter.api.AfterAll; import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.RabbitMQContainer; @@ -43,28 +42,29 @@ public abstract class AbstractIntegrationTests { .withExposedPorts(5672, 15672, 5552) .withPluginsEnabled("rabbitmq_stream", "rabbitmq_management") .withStartupTimeout(Duration.ofMinutes(2)); + System.out.println("Created"); RABBITMQ.start(); + System.out.println("Started"); } else { RABBITMQ = null; } + System.out.println(RABBITMQ); } public static int amqpPort() { + System.out.println("amqp:" + RABBITMQ); return RABBITMQ != null ? RABBITMQ.getMappedPort(5672) : 5672; } public static int managementPort() { + System.out.println("mgmt:" + RABBITMQ); return RABBITMQ != null ? RABBITMQ.getMappedPort(15672) : 15672; } public static int streamPort() { + System.out.println("stream:" + RABBITMQ); return RABBITMQ != null ? RABBITMQ.getMappedPort(5552) : 5552; } - @AfterAll - static void shutDown() { - RABBITMQ.close(); - } - }