Skip to content

Commit

Permalink
github: replace call for sleep with wait-for-it.sh
Browse files Browse the repository at this point in the history
Previously integration tests invoked `sleep 10` to "give time to settle"
the environment. In a fast container, waiting for so long is not needed
and in a slow one it might not be enough.

This commit changes this line to use `./util/wait-for-it.sh` instead [1]
to check robustly that the port is being listened to.

Fixes #49.

[1] https://github.com/vishnubob/wait-for-it

Signed-off-by: Mikhail Koviazin <[email protected]>
  • Loading branch information
mkmkme committed Sep 4, 2024
1 parent b10b338 commit c9ff993
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ jobs:
pip install "libvalkey>=4.0.0"
fi
invoke devenv
sleep 10 # time to settle
if [[ "${{matrix.test-type}}" == "standalone" ]]; then
./util/wait-for-it.sh localhost:6379
else
./util/wait-for-it.sh localhost:16379
fi
invoke ${{matrix.test-type}}-tests --protocol=${{ matrix.protocol-version }}
if [[ "${{matrix.python-version}}" != pypy-* ]]; then
invoke ${{matrix.test-type}}-tests --uvloop --protocol=${{ matrix.protocol-version }}
Expand Down

0 comments on commit c9ff993

Please sign in to comment.