Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
da938dc1
Commit
da938dc1
authored
Jun 25, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some sleep to the verification loop.
Programming is hard, sleep 5!
parent
0bf936d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
services.sh
hack/e2e-suite/services.sh
+22
-14
No files found.
hack/e2e-suite/services.sh
View file @
da938dc1
...
...
@@ -278,20 +278,28 @@ function wait_for_service_down() {
# $5: pod IDs (sorted)
function
verify_from_container
()
{
echo
"waiting for
$1
at
$2
:
$3
"
results
=(
$(
ssh-to-node
"
${
test_node
}
"
"
set -e;
sudo docker pull gcr.io/google_containers/busybox >/dev/null;
sudo docker run gcr.io/google_containers/busybox sh -c '
for i in
$(
seq
-s
' '
1
$((
$4
*
3
)))
; do
if wget -q -T 3 -O - http://
$2
:
$3
; then
echo
else
exit 1
fi
done
'"
|
sort
-r
-n
|
uniq
)
)
\
||
error
"testing
$1
VIP from container failed"
found_pods
=
$(
sort_args
"
${
results
[@]
}
"
)
# 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
}
"
"
set -e;
sudo docker pull gcr.io/google_containers/busybox >/dev/null;
sudo docker run gcr.io/google_containers/busybox sh -c '
for i in
$(
seq
-s
' '
1
$((
$4
*
3
)))
; do
if wget -q -T 3 -O - http://
$2
:
$3
; then
echo
else
exit 1
fi
done
'"
|
sort
-r
-n
|
uniq
)
)
\
||
error
"testing
$1
VIP from container failed"
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
echo
"expected '
$5
', got '
${
found_pods
}
'"
error
"
$1
: failed to verify VIP from container"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment