Skip to content

Commit 2bc36e0

Browse files
committed
ci: fix retry loop
1 parent 36568f8 commit 2bc36e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ci-test-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ jobs:
229229
230230
for attempt in $(seq 1 "$retries"); do
231231
local is_primary
232-
is_primary=$(docker compose $COMPOSE_FILES exec -T mongo mongosh --quiet --eval "try { const hello = db.hello(); print((hello.isWritablePrimary || hello.ismaster) ? '1' : '0'); } catch (e) { print('0'); }" 2>/dev/null | tail -n1)
232+
is_primary=$(docker compose $COMPOSE_FILES exec -T mongo mongosh --quiet --eval "try { const hello = db.hello(); print((hello.isWritablePrimary || hello.ismaster) ? '1' : '0'); } catch (e) { print('0'); }" 2>/dev/null | tail -n1 || true)
233233
234234
if [[ "$is_primary" == '1' ]]; then
235235
echo "Mongo replica set primary is ready"

0 commit comments

Comments
 (0)