From 054a479f18ec2e60c4d005324a067da3b63ca37e Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 6 Nov 2025 19:24:27 -0800 Subject: [PATCH] address comments --- test/foundationdb/Makefile | 1 - test/foundationdb/docker-compose.arm64.yml | 3 --- test/foundationdb/docker-compose.build.yml | 6 ++++-- test/foundationdb/docker-compose.simple.yml | 12 +++++++++--- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/test/foundationdb/Makefile b/test/foundationdb/Makefile index 4a1a80b87..ff106d7dc 100644 --- a/test/foundationdb/Makefile +++ b/test/foundationdb/Makefile @@ -108,7 +108,6 @@ clean: ## Clean up test environment (standard + ARM64) @echo "$(YELLOW)Cleaning up test environment...$(NC)" @$(DOCKER_COMPOSE) down -v --remove-orphans 2>/dev/null || true @$(DOCKER_COMPOSE_ARM64) down -v --remove-orphans 2>/dev/null || true - @docker system prune -f @echo "$(GREEN)✅ Environment cleaned up!$(NC)" logs: ## Show logs from all services diff --git a/test/foundationdb/docker-compose.arm64.yml b/test/foundationdb/docker-compose.arm64.yml index 9eda8db42..5b0854485 100644 --- a/test/foundationdb/docker-compose.arm64.yml +++ b/test/foundationdb/docker-compose.arm64.yml @@ -131,9 +131,6 @@ services: fdbcli -C /var/fdb/config/fdb.cluster --exec 'status' echo 'FoundationDB cluster initialization complete!' - - # Keep container running for debugging if needed - tail -f /dev/null " # SeaweedFS service with FoundationDB filer diff --git a/test/foundationdb/docker-compose.build.yml b/test/foundationdb/docker-compose.build.yml index 6f6d2ce99..37a6f3a6f 100644 --- a/test/foundationdb/docker-compose.build.yml +++ b/test/foundationdb/docker-compose.build.yml @@ -62,8 +62,10 @@ services: seaweedfs-test: image: seaweedfs:foundationdb depends_on: - - fdb-init - - seaweedfs-fdb-builder + fdb-init: + condition: service_completed_successfully + seaweedfs-fdb-builder: + condition: service_completed_successfully volumes: - fdb_config:/var/fdb/config - seaweedfs-build:/build/output diff --git a/test/foundationdb/docker-compose.simple.yml b/test/foundationdb/docker-compose.simple.yml index d5250b9ec..1977469e3 100644 --- a/test/foundationdb/docker-compose.simple.yml +++ b/test/foundationdb/docker-compose.simple.yml @@ -15,6 +15,12 @@ services: - fdb_config:/var/fdb/config networks: - test_network + healthcheck: + test: ["CMD", "fdbcli", "-C", "/var/fdb/config/fdb.cluster", "--exec", "status"] + interval: 5s + timeout: 3s + retries: 10 + start_period: 20s command: > bash -c " echo 'Starting FoundationDB single node...' && @@ -43,7 +49,8 @@ services: context: ../.. dockerfile: test/foundationdb/Dockerfile.test depends_on: - - foundationdb + foundationdb: + condition: service_healthy volumes: - fdb_config:/var/fdb/config - test_results:/test/results @@ -56,8 +63,7 @@ services: - WEED_FOUNDATIONDB_API_VERSION=720 command: > bash -c " - echo 'Waiting for FoundationDB to be ready...' && - sleep 15 && + echo 'FoundationDB is ready, starting tests...' && echo 'Testing FoundationDB connection...' && fdbcli -C /var/fdb/config/fdb.cluster --exec 'status' &&