mirror of
https://github.com/containers/podman.git
synced 2025-06-23 10:38:20 +08:00
Merge pull request #13558 from Luap99/compose-flake
fix compose test flake
This commit is contained in:
@ -3,4 +3,18 @@
|
||||
output="$(cat $OUTFILE)"
|
||||
expected="teststring"
|
||||
|
||||
# Reading from the nc socket is flaky because docker-compose only starts
|
||||
# the containers. We cannot know at this point if the container did already
|
||||
# send the message. Give the container 5 seconds time to send the message
|
||||
# to prevent flakes.
|
||||
local _timeout=5
|
||||
while [ $_timeout -gt 0 ]; do
|
||||
if [ -n "$output" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
_timeout=$(($_timeout - 1))
|
||||
output="$(cat $OUTFILE)"
|
||||
done
|
||||
|
||||
is "$output" "$expected" "$testname : nc received teststring"
|
||||
|
Reference in New Issue
Block a user