Skip to content

Commit c9ff993

Browse files
author
Mikhail Koviazin
committed
github: replace call for sleep with wait-for-it.sh
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]>
1 parent b10b338 commit c9ff993

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/integration.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ jobs:
7979
pip install "libvalkey>=4.0.0"
8080
fi
8181
invoke devenv
82-
sleep 10 # time to settle
82+
if [[ "${{matrix.test-type}}" == "standalone" ]]; then
83+
./util/wait-for-it.sh localhost:6379
84+
else
85+
./util/wait-for-it.sh localhost:16379
86+
fi
8387
invoke ${{matrix.test-type}}-tests --protocol=${{ matrix.protocol-version }}
8488
if [[ "${{matrix.python-version}}" != pypy-* ]]; then
8589
invoke ${{matrix.test-type}}-tests --uvloop --protocol=${{ matrix.protocol-version }}

0 commit comments

Comments
 (0)