Skip to content

Commit 0cce533

Browse files
committed
Fix Stream TestContainer
- do not close the container; used by other tests.
1 parent 4ee9d21 commit 0cce533

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/support/AbstractIntegrationTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 the original author or authors.
2+
* Copyright 2021-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
1818

1919
import java.time.Duration;
2020

21-
import org.junit.jupiter.api.AfterAll;
2221
import org.testcontainers.containers.GenericContainer;
2322
import org.testcontainers.containers.RabbitMQContainer;
2423

@@ -43,28 +42,29 @@ public abstract class AbstractIntegrationTests {
4342
.withExposedPorts(5672, 15672, 5552)
4443
.withPluginsEnabled("rabbitmq_stream", "rabbitmq_management")
4544
.withStartupTimeout(Duration.ofMinutes(2));
45+
System.out.println("Created");
4646
RABBITMQ.start();
47+
System.out.println("Started");
4748
}
4849
else {
4950
RABBITMQ = null;
5051
}
52+
System.out.println(RABBITMQ);
5153
}
5254

5355
public static int amqpPort() {
56+
System.out.println("amqp:" + RABBITMQ);
5457
return RABBITMQ != null ? RABBITMQ.getMappedPort(5672) : 5672;
5558
}
5659

5760
public static int managementPort() {
61+
System.out.println("mgmt:" + RABBITMQ);
5862
return RABBITMQ != null ? RABBITMQ.getMappedPort(15672) : 15672;
5963
}
6064

6165
public static int streamPort() {
66+
System.out.println("stream:" + RABBITMQ);
6267
return RABBITMQ != null ? RABBITMQ.getMappedPort(5552) : 5552;
6368
}
6469

65-
@AfterAll
66-
static void shutDown() {
67-
RABBITMQ.close();
68-
}
69-
7070
}

0 commit comments

Comments
 (0)