We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent decd7a9 commit 35c324fCopy full SHA for 35c324f
1 file changed
cpp/src/arrow/flight/sql/odbc/tests/dremio/set_up_dremio_instance.sh
@@ -31,9 +31,22 @@ MAX_WAIT_ATTEMPTS=60
31
WAIT_INTERVAL_SECONDS=5
32
33
# Wait for Dremio to be available.
34
-until curl -s "$NEW_USER_URL"; do
35
- echo 'Waiting for Dremio to start...'
36
- sleep $WAIT_INTERVAL_SECONDS
+attempt=1
+until status_code="$(
+ curl --silent \
37
+ --output /dev/null \
38
+ --write-out '%{http_code}' \
39
+ "$NEW_USER_URL"
40
+)"; [[ "$status_code" == "200" || "$status_code" == "404" || "$status_code" == "405" ]]; do
41
+
42
+ if [[ "$attempt" -ge "$MAX_WAIT_ATTEMPTS" ]]; then
43
+ echo "Timed out waiting for Dremio to start." >&2
44
+ exit 1
45
+ fi
46
47
+ echo "Waiting for Dremio to start... HTTP $status_code"
48
+ attempt=$((attempt + 1))
49
+ sleep "$WAIT_INTERVAL_SECONDS"
50
done
51
52
echo ""
0 commit comments