Skip to content

Commit

Permalink
Added server readiness string listening to integration tests to reduc…
Browse files Browse the repository at this point in the history
…e flakiness (TraceMachina#378)
  • Loading branch information
blakehatch authored Nov 5, 2023
1 parent c4b296c commit 22abf90
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ for pattern in "${TEST_PATTERNS[@]}"; do
FILENAME=$(basename $fullpath)
echo "Running test $FILENAME"
sudo docker-compose up -d
if perl -e 'alarm shift; exec @ARGV' 30 bash -c 'until sudo docker-compose logs | grep -q "Ready, listening on"; do sleep 1; done'
then
echo "String 'Ready, listening on' found in the logs."
else
echo "String 'Ready, listening on' not found in the logs within the given time."
fi
set +e
bash -euo pipefail "$fullpath"
EXIT_CODE="$?"
Expand Down

0 comments on commit 22abf90

Please sign in to comment.