From 8949a8eac82a75c406f82dd47ea74a59ec659e61 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Wed, 4 Nov 2020 15:14:11 +0300 Subject: [PATCH] Use `curl` retry flags for waiting for service `--connect-timeout` didn't work, because Docker allows it, but breaks, because nothing is listening on the other side, giving this error. $ curl --connect-timeout 10 http://localhost:8002 curl: (56) Recv failure: Connection reset by peer The command "curl --connect-timeout 10 http://localhost:8002" exited with 56. https://travis-ci.org/github/chubin/cheat.sh/builds/741348053#L401 `--retry-all` makes `curl` retry on all errors, including connection resets. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 21b10e2..88a8805 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ before_install: - docker-compose ps script: - - curl --connect-timeout 10 http://localhost:8002 + - curl --retry 3 --retry-all http://localhost:8002 - docker-compose logs --no-color - docker logs chtsh - CHEATSH_TEST_STANDALONE=NO bash tests/run-tests.sh