Skip to content

Commit 0fb586e

Browse files
committed
FIX "connection refused" error in integration test with healthcheck on ActiveMQ
1 parent 35501db commit 0fb586e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

integration/docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,22 @@ services:
77
- ..:/code
88
command: go test -v -race
99
working_dir: /code/integration
10+
depends_on:
11+
activemq:
12+
condition: service_healthy
1013
environment:
1114
- MQTT_HOSTS=activemq emqx hivemq mosquitto rumqttd vernemq
1215

1316
activemq:
1417
image: apache/activemq-artemis:2.39.0
1518
mem_limit: 500m
19+
# TCP "connection refused" error before HTTP service
20+
healthcheck:
21+
test: ["CMD", "curl", "http://localhost:8161"]
22+
interval: 2s
23+
timeout: 1s
24+
retries: 10
25+
1626
emqx:
1727
image: emqx/emqx:5.7.2
1828
mem_limit: 500m

0 commit comments

Comments
 (0)