File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/support Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 58
58
micrometerVersion = ' 1.10.0-M6'
59
59
micrometerTracingVersion = ' 1.0.0-M8'
60
60
mockitoVersion = ' 4.8.0'
61
- rabbitmqStreamVersion = ' 0.7 .0'
61
+ rabbitmqStreamVersion = ' 0.8 .0'
62
62
rabbitmqVersion = project. hasProperty(' rabbitmqVersion' ) ? project. rabbitmqVersion : ' 5.16.0'
63
63
rabbitmqHttpClientVersion = ' 3.12.1'
64
64
reactorVersion = ' 2022.0.0-M6'
Original file line number Diff line number Diff line change 18
18
19
19
import java .time .Duration ;
20
20
21
+ import org .junit .jupiter .api .AfterAll ;
21
22
import org .testcontainers .containers .GenericContainer ;
22
- import org .testcontainers .utility . DockerImageName ;
23
+ import org .testcontainers .containers . RabbitMQContainer ;
23
24
24
25
/**
25
26
* @author Gary Russell
@@ -33,13 +34,14 @@ public abstract class AbstractIntegrationTests {
33
34
static {
34
35
if (System .getProperty ("spring.rabbit.use.local.server" ) == null
35
36
&& System .getenv ("SPRING_RABBIT_USE_LOCAL_SERVER" ) == null ) {
36
- String image = "pivotalrabbitmq/ rabbitmq-stream " ;
37
+ String image = "rabbitmq:3.11 " ;
37
38
String cache = System .getenv ().get ("IMAGE_CACHE" );
38
39
if (cache != null ) {
39
40
image = cache + image ;
40
41
}
41
- RABBITMQ = new GenericContainer <>( DockerImageName . parse ( image ) )
42
+ RABBITMQ = new RabbitMQContainer ( image )
42
43
.withExposedPorts (5672 , 15672 , 5552 )
44
+ .withPluginsEnabled ("rabbitmq_stream" , "rabbitmq_management" )
43
45
.withStartupTimeout (Duration .ofMinutes (2 ));
44
46
RABBITMQ .start ();
45
47
}
@@ -60,4 +62,9 @@ public static int streamPort() {
60
62
return RABBITMQ != null ? RABBITMQ .getMappedPort (5552 ) : 5552 ;
61
63
}
62
64
65
+ @ AfterAll
66
+ static void shutDown () {
67
+ RABBITMQ .close ();
68
+ }
69
+
63
70
}
You can’t perform that action at this time.
0 commit comments