Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit de20e5e

Browse files
committedMay 16, 2025··
fixup! chore(tests): Perform 3 factory resets in a row in integration tests
1 parent 99aea6c commit de20e5e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎tests/integration/test-factory-reset

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ fi
109109
success API config file reset
110110

111111
wait-until-restarted() {
112-
edo log_as_trace_ xh GET -Iq "${INTEGRATION_TEST_HOST:?}"/api-docs/openapi.json --timeout 3 -p=HBhm || abort API stuck restarting.
112+
local start=$(date +%s) now elapsed timeout=3
113+
while ! edo log_as_trace_ xh GET -Iq "${INTEGRATION_TEST_HOST:?}"/api-docs/openapi.json --timeout $timeout -p=HBhm; do
114+
now=$(date +%s)
115+
elapsed=$((now - start))
116+
if (( elapsed >= $timeout )); then
117+
abort API stuck restarting.
118+
fi
119+
done
113120
}
114121

115122
info Waiting for the API to restart…

0 commit comments

Comments
 (0)
Please sign in to comment.