mirror of https://github.com/docker/docs.git
Merge pull request #1909 from dongluochen/FrequentIntegrationTestFailure
Remove internal retry in discovery_check_swarm_info
This commit is contained in:
commit
47bc7cd93a
|
|
@ -85,6 +85,8 @@ function teardown() {
|
||||||
# Check that we can add instances back to the cluster
|
# Check that we can add instances back to the cluster
|
||||||
start_docker 2
|
start_docker 2
|
||||||
swarm_join "$DISCOVERY"
|
swarm_join "$DISCOVERY"
|
||||||
|
run docker_swarm info
|
||||||
|
echo $output
|
||||||
retry 10 1 discovery_check_swarm_info 2
|
retry 10 1 discovery_check_swarm_info 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,5 +108,7 @@ function teardown() {
|
||||||
|
|
||||||
# After a while, `join` and `manage` should reach the store.
|
# After a while, `join` and `manage` should reach the store.
|
||||||
retry 20 1 discovery_check_swarm_list "$DISCOVERY"
|
retry 20 1 discovery_check_swarm_list "$DISCOVERY"
|
||||||
|
run docker_swarm info
|
||||||
|
echo $output
|
||||||
retry 20 1 discovery_check_swarm_info
|
retry 20 1 discovery_check_swarm_info
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ function discovery_check_swarm_info() {
|
||||||
local host="$2"
|
local host="$2"
|
||||||
[ -z "$host" ] && host="${SWARM_HOSTS[0]}"
|
[ -z "$host" ] && host="${SWARM_HOSTS[0]}"
|
||||||
|
|
||||||
retry 10 1 eval "docker -H $host info | grep -q -e \"Nodes: $total\" -e \"Offers: $total\""
|
eval "docker -H $host info | grep -q -e \"Nodes: $total\" -e \"Offers: $total\""
|
||||||
}
|
}
|
||||||
|
|
||||||
# Return true if all nodes has been validated
|
# Return true if all nodes has been validated
|
||||||
|
|
@ -107,7 +107,7 @@ function swarm_manage() {
|
||||||
swarm_manage_no_wait "$@"
|
swarm_manage_no_wait "$@"
|
||||||
|
|
||||||
# Wait for nodes to be discovered
|
# Wait for nodes to be discovered
|
||||||
discovery_check_swarm_info "${#HOSTS[@]}" "${SWARM_HOSTS[$i]}"
|
retry 10 1 discovery_check_swarm_info "${#HOSTS[@]}" "${SWARM_HOSTS[$i]}"
|
||||||
|
|
||||||
# All nodes passes pending state
|
# All nodes passes pending state
|
||||||
retry 15 1 nodes_validated
|
retry 15 1 nodes_validated
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue