Skip to content

Commit cd7721f

Browse files
committed
Try to fix tests
1 parent 4f0d605 commit cd7721f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docker-compose-tests.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ services:
1717
- 9123:9123
1818
volumes:
1919
- ./tests_override.xml:/bitnami/clickhouse/etc/conf.d/override.xml:ro
20+
healthcheck:
21+
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9123/ping"]
22+
interval: 5s
23+
timeout: 3s
24+
retries: 5
25+
start_period: 10s
2026

2127
mysql_db:
2228
image: mysql:8.4.3
@@ -30,6 +36,12 @@ services:
3036
- ./test_mysql.cnf:/etc/mysql/my.cnf:ro
3137
networks:
3238
- default
39+
healthcheck:
40+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$$MYSQL_ROOT_PASSWORD"]
41+
interval: 5s
42+
timeout: 3s
43+
retries: 5
44+
start_period: 10s
3345

3446
mariadb_db:
3547
image: mariadb:11.5.2
@@ -43,6 +55,12 @@ services:
4355
- 9307:3306
4456
volumes:
4557
- ./test_mariadb.cnf:/etc/mysql/my.cnf:ro # Adjust path to MariaDB config location if needed
58+
healthcheck:
59+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$$MARIADB_ROOT_PASSWORD"]
60+
interval: 5s
61+
timeout: 3s
62+
retries: 5
63+
start_period: 10s
4664

4765
replicator:
4866
build:
@@ -58,3 +76,10 @@ services:
5876
interval: 2s
5977
retries: 100
6078
start_period: 10s
79+
depends_on:
80+
clickhouse_db:
81+
condition: service_healthy
82+
mysql_db:
83+
condition: service_healthy
84+
mariadb_db:
85+
condition: service_healthy

0 commit comments

Comments
 (0)