Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit ce99491

Browse files
committed
add a script to wait for vertica is up
1 parent a508092 commit ce99491

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,6 @@ jobs:
4949
DATADIFF_TRINO_URI: '${{ secrets.DATADIFF_TRINO_URI }}'
5050
DATADIFF_CLICKHOUSE_URI: 'clickhouse://clickhouse:Password1@localhost:9000/clickhouse'
5151
DATADIFF_VERTICA_URI: 'vertica://vertica:Password1@localhost:5433/vertica'
52-
run: poetry run unittest-parallel -j 16
52+
run: |
53+
chmod +x tests/waiting_for_stack_up.sh
54+
./tests/waiting_for_stack_up.sh && poetry run unittest-parallel -j 16

tests/waiting_for_stack_up.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
if [ -n "$DATADIFF_VERTICA_URI" ]
4+
then
5+
echo "Check Vertica DB running..."
6+
while true
7+
do
8+
if docker logs vertica | tail -n 100 | grep -q -i "vertica is now running"
9+
then
10+
echo "Vertica DB is ready";
11+
break;
12+
else
13+
echo "Waiting for Vertica DB starting...";
14+
sleep 10;
15+
fi
16+
done
17+
fi

0 commit comments

Comments
 (0)