Skip to content

Commit

Permalink
tests: increase waiting time and hope for the best
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Mar 5, 2018
1 parent ee4591d commit 2e51332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/build_test_env.sh
Expand Up @@ -139,6 +139,6 @@ log "Config file content ($CONFIG):"
log <$CONFIG

log "Pausing to give GitLab some time to finish starting up..."
sleep 30
sleep 60

log "Test environment initialized."

3 comments on commit 2e51332

@larsks
Copy link

@larsks larsks commented on 2e51332 Mar 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just run curl in a loop until you have a successful connection? E.g., something like:

while ! curl -sf -H "PRIVATE-TOKEN: $TOKEN" https://localhost:8080/api/$API_VER/version; do
  sleep 1
done

@gpocentek
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@larsks thanks for the suggestion!

This is definitely a better solution than my quick "fix". Do you think you could prepare a PR?

@larsks
Copy link

@larsks larsks commented on 2e51332 Mar 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.