summaryrefslogtreecommitdiff
path: root/test/compose/test-compose
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-07 08:16:38 -0400
committerGitHub <noreply@github.com>2021-04-07 08:16:38 -0400
commitb8a4494b102a84e21e267ad1242e4af9ca413f2f (patch)
tree6227fe16778f6c8dcaff9c1e3bdb946fa3d4cc16 /test/compose/test-compose
parent6d0c554cbb36bbfda786fb2e4b12239af91781cb (diff)
parent42e4609faf2adc4c6c81a1fb700b064b28497781 (diff)
downloadpodman-b8a4494b102a84e21e267ad1242e4af9ca413f2f.tar.gz
podman-b8a4494b102a84e21e267ad1242e4af9ca413f2f.tar.bz2
podman-b8a4494b102a84e21e267ad1242e4af9ca413f2f.zip
Merge pull request #9961 from Luap99/fix-compose-flake
Fix flaking rootless compose test
Diffstat (limited to 'test/compose/test-compose')
-rwxr-xr-xtest/compose/test-compose8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/compose/test-compose b/test/compose/test-compose
index 704c71a9f..7693041ac 100755
--- a/test/compose/test-compose
+++ b/test/compose/test-compose
@@ -163,7 +163,13 @@ function test_port() {
local op="$2" # '=' or '~'
local expect="$3" # what to expect from curl output
- local actual=$(curl --retry 10 --retry-all-errors -s http://127.0.0.1:$port/)
+ local actual=$(curl --retry 3 --retry-all-errors -s http://127.0.0.1:$port/)
+ # The test is flaking with an empty result. The curl retry doesn't solve this.
+ # If the result is empty sleep one second and try again.
+ if [[ "$actual" == "" ]]; then
+ sleep 1
+ local actual=$(curl --retry 3 --retry-all-errors -s http://127.0.0.1:$port/)
+ fi
local curl_rc=$?
if [ $curl_rc -ne 0 ]; then
_show_ok 0 "$testname - curl failed with status $curl_rc"