Skip to content

Commit 967eeea

Browse files
committed
hack/integration-docker.sh: increase sleep
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1 parent a2512d2 commit 967eeea

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

hack/integration-docker.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@ source $(realpath $(dirname $0))/common.inc.sh
33

44
nonloopback="$(hostname -I | awk '{print $1}')"
55

6+
7+
SLEEP_SECS=2
8+
[ "$DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER" = "implicit" ] && SLEEP_SECS=10
9+
610
docker rm -f nginx >/dev/null 2>&1 || true
711

812
CURL="curl -fsSL"
913
set -x
1014

1115
docker run -d --name=nginx -p 8080:80 nginx:alpine
12-
sleep 2
16+
sleep "$SLEEP_SECS"
1317
$CURL "http://127.0.0.1:8080"
1418
$CURL "http://${nonloopback}:8080"
1519
docker rm -f nginx
1620

1721
docker run -d --name=nginx -p 127.0.0.1:8080:80 nginx:alpine
18-
sleep 2
22+
sleep "$SLEEP_SECS"
1923
$CURL "http://127.0.0.1:8080"
2024
$CURL "http://${nonloopback}:8080" && ( ERROR "should fail"; exit 1 )
2125
docker rm -f nginx
@@ -24,7 +28,7 @@ docker rm -f nginx
2428
# "Error starting userland proxy: listen tcp4 172.18.0.2:8080: bind: cannot assign requested address."
2529
if [ "$DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER" != "implicit" ]; then
2630
docker run -d --name=nginx -p "${nonloopback}:8080:80" nginx:alpine
27-
sleep 2
31+
sleep "$SLEEP_SECS"
2832
$CURL "http://127.0.0.1:8080" && ( ERROR "should fail"; exit 1 )
2933
$CURL "http://${nonloopback}:8080"
3034
docker rm -f nginx

0 commit comments

Comments
 (0)