-
Notifications
You must be signed in to change notification settings - Fork 798
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes some flaky tests in the build as well as the case when tests st…
…art before kafka is ready.
- Loading branch information
1 parent
a8e5eab
commit de34fb8
Showing
5 changed files
with
39 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#/bin/bash | ||
|
||
COUNTER=0; | ||
echo foo | nc localhost 9092 | ||
STATUS=$? | ||
ATTEMPTS=60 | ||
until [ ${STATUS} -eq 0 ] || [ "$COUNTER" -ge "${ATTEMPTS}" ]; | ||
do | ||
let COUNTER=$COUNTER+1; | ||
sleep 1; | ||
echo "[$COUNTER] waiting for 9092 port to be open"; | ||
echo foo | nc localhost 9092 | ||
STATUS=$? | ||
done | ||
|
||
if [ "${COUNTER}" -gt "${ATTEMPTS}" ]; | ||
then | ||
echo "Kafka is not running, failing" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters