mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
Merge pull request #10364 from brendandburns/e2e2
Add some sleep to the verification loop.
This commit is contained in:
commit
24de9afded
@ -278,6 +278,8 @@ function wait_for_service_down() {
|
|||||||
# $5: pod IDs (sorted)
|
# $5: pod IDs (sorted)
|
||||||
function verify_from_container() {
|
function verify_from_container() {
|
||||||
echo "waiting for $1 at $2:$3"
|
echo "waiting for $1 at $2:$3"
|
||||||
|
# TODO: Reduce this interval once we have a sense for the latency distribution.
|
||||||
|
for x in {0..9}; do
|
||||||
results=($(ssh-to-node "${test_node}" "
|
results=($(ssh-to-node "${test_node}" "
|
||||||
set -e;
|
set -e;
|
||||||
sudo docker pull gcr.io/google_containers/busybox >/dev/null;
|
sudo docker pull gcr.io/google_containers/busybox >/dev/null;
|
||||||
@ -292,6 +294,12 @@ function verify_from_container() {
|
|||||||
'" | sort -r -n | uniq)) \
|
'" | sort -r -n | uniq)) \
|
||||||
|| error "testing $1 VIP from container failed"
|
|| error "testing $1 VIP from container failed"
|
||||||
found_pods=$(sort_args "${results[@]}")
|
found_pods=$(sort_args "${results[@]}")
|
||||||
|
if [[ "${found_pods}" == "$5" ]]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "waiting for services iteration $x"
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
if [[ "${found_pods}" != "$5" ]]; then
|
if [[ "${found_pods}" != "$5" ]]; then
|
||||||
echo "expected '$5', got '${found_pods}'"
|
echo "expected '$5', got '${found_pods}'"
|
||||||
error "$1: failed to verify VIP from container"
|
error "$1: failed to verify VIP from container"
|
||||||
|
Loading…
Reference in New Issue
Block a user