Skip to content

Commit 5d8e1c1

Browse files
committed
chore: improve RabbitMQ setup and update waiting conditions
- Change RabbitMQ image to `rabbitmq:3-management` - Update waiting condition to use `wait.ForListeningPort("5672/tcp")` instead of `wait.ForLog("TCP: listening on")` Signed-off-by: appleboy <[email protected]>
1 parent e6b5e17 commit 5d8e1c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rabbitmq_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ func (m mockMessage) Bytes() []byte {
3434

3535
func setupRabbitMQContainer(ctx context.Context, t *testing.T) (testcontainers.Container, string) {
3636
req := testcontainers.ContainerRequest{
37-
Image: "rabbitmq:3",
37+
Image: "rabbitmq:3-management",
3838
ExposedPorts: []string{
3939
"5672/tcp", // amqp
4040
"15672/tcp", // management plugin
4141
},
42-
WaitingFor: wait.ForLog("TCP: listening on"),
42+
WaitingFor: wait.ForListeningPort("5672/tcp"),
4343
Env: map[string]string{
4444
"RABBITMQ_DEFAULT_USER": "guest",
4545
"RABBITMQ_DEFAULT_PASS": "guest",

0 commit comments

Comments
 (0)