diff --git a/.github/workflows/cassandra.yml b/.github/workflows/cassandra.yml index 58305af1bb..8b0f61b918 100644 --- a/.github/workflows/cassandra.yml +++ b/.github/workflows/cassandra.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup 3-node Cassandra cluster run: | - docker compose -f test/cluster/cassandra/docker-compose.yml up -d + docker compose -f test/cluster/cassandra/docker-compose.yml up -d --wait # A separate step for building to separate measuring time of compilation and testing - name: Build the project run: cargo build --verbose --tests diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1e96817e5a..0b1a5d09a3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,7 +21,7 @@ jobs: - name: Setup 3-node Scylla cluster run: | sudo sh -c "echo 2097152 >> /proc/sys/fs/aio-max-nr" - docker compose -f test/cluster/docker-compose.yml up -d + docker compose -f test/cluster/docker-compose.yml up -d --wait - name: Format check run: cargo fmt --verbose --all -- --check - name: Clippy check diff --git a/Makefile b/Makefile index 0bd033433e..7cdaeb2d13 100644 --- a/Makefile +++ b/Makefile @@ -30,14 +30,14 @@ clippy: RUSTFLAGS=-Dwarnings cargo clippy --examples --tests -- -Aclippy::uninlined_format_args .PHONY: test -test: up wait-for-cluster +test: up SCYLLA_URI=172.42.0.2:9042 \ SCYLLA_URI2=172.42.0.3:9042 \ SCYLLA_URI3=172.42.0.4:9042 \ cargo test .PHONY: dockerized-test -dockerized-test: up wait-for-cluster +dockerized-test: up test/dockerized/run.sh .PHONY: build @@ -50,7 +50,7 @@ docs: .PHONY: up up: - $(COMPOSE) up -d + $(COMPOSE) up -d --wait @echo @echo "ScyllaDB cluster is running in the background. Use 'make down' to stop it." @echo @@ -75,7 +75,3 @@ shell: clean: down cargo clean rm -rf docs/book - -.PHONY: wait-for-cluster -wait-for-cluster: - @test/cluster/wait.sh diff --git a/test/cluster/wait.sh b/test/cluster/wait.sh deleted file mode 100755 index 43bead6e5a..0000000000 --- a/test/cluster/wait.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "Waiting for the cluster to become ready." -echo " Inspect 'make logs' output if this step takes too long." - -DOCKER_COMPOSE='docker compose -f test/cluster/docker-compose.yml' -TEST_QUERY='select * from system.local' - -for NODE in 'scylla1' 'scylla2' 'scylla3'; do - until $DOCKER_COMPOSE exec "$NODE" cqlsh -e "$TEST_QUERY" > /dev/null; do - printf '.'; - sleep 1; - done -done - -echo "Done waiting."