Skip to content

Commit 9db159c

Browse files
committed
Hopefully remove unnecessary sleeps and instead wait for processes to finish
1 parent ffe3b8d commit 9db159c

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/workflows/IntegrationTests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,4 @@ jobs:
8585
run: |
8686
source ./scripts/run_s3_test_server.sh
8787
source ./scripts/set_s3_test_server_variables.sh
88-
sleep 30
8988
make test

scripts/minio_s3.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,6 @@ services:
7777
/usr/bin/mc share download myminio/test-bucket/presigned/lineitem_large.parquet
7878
/usr/bin/mc share download myminio/test-bucket/presigned/attach.db
7979
80+
echo 'FINISHED SETTING UP MINIO'
8081
exit 0;
8182
"

scripts/run_s3_test_server.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,19 @@ else
1111
docker compose -f scripts/minio_s3.yml -p duckdb-minio up -d
1212

1313
# for testing presigned url
14-
sleep 10
1514
container_name=$(docker ps -a --format '{{.Names}}' | grep -m 1 "duckdb-minio")
1615
echo $container_name
1716

17+
for i in $(seq 1 360);
18+
do
19+
logs=$(docker logs $container_name 2>/dev/null | grep 'FINISHED SETTING UP MINIO')
20+
if [ ! -z "${logs}" ]; then
21+
break
22+
fi
23+
sleep 1
24+
done
25+
26+
1827
export S3_SMALL_CSV_PRESIGNED_URL=$(docker logs $container_name 2>/dev/null | grep -m 1 'Share:.*phonenumbers\.csv' | grep -o 'http[s]\?://[^ ]\+')
1928
echo $S3_SMALL_CSV_PRESIGNED_URL
2029

0 commit comments

Comments
 (0)