From 7fddaa9fd12bb657b745ea465f4201d280adaf00 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Fri, 23 Sep 2016 15:13:25 +0000 Subject: [PATCH 1/3] Print logs to debug shutdown integration test --- integration/110_shutdown_test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integration/110_shutdown_test.sh b/integration/110_shutdown_test.sh index 631df89cf..70ba22368 100755 --- a/integration/110_shutdown_test.sh +++ b/integration/110_shutdown_test.sh @@ -9,8 +9,10 @@ scope_on $HOST1 stop sleep 10 -assert_raises "docker_on $HOST1 logs weavescope 2>&1 | grep 'app exiting'" -assert_raises "docker_on $HOST1 logs weavescope 2>&1 | grep 'probe exiting'" +# Save stdout for debugging output +exec 3>&1 +assert_raises "docker_on $HOST1 logs weavescope 2>&1 | grep 'app exiting' || (docker_on $HOST1 logs weavescope 2>&3 ; false)" +assert_raises "docker_on $HOST1 logs weavescope 2>&1 | grep 'probe exiting' || (docker_on $HOST1 logs weavescope 2>&3 ; false)" assert_raises "docker_on $HOST1 inspect --format='{{.State.Running}}' weavescope" "false" scope_end_suite From c15d071f88812d6190cd48358db5f407d08918ed Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Mon, 26 Sep 2016 08:11:04 +0000 Subject: [PATCH 2/3] Add sleep between scope launch and top --- integration/110_shutdown_test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/integration/110_shutdown_test.sh b/integration/110_shutdown_test.sh index 70ba22368..a62c2392d 100755 --- a/integration/110_shutdown_test.sh +++ b/integration/110_shutdown_test.sh @@ -5,6 +5,7 @@ start_suite "Check scope exits cleanly within 10 seconds" scope_on $HOST1 launch +sleep 10 scope_on $HOST1 stop sleep 10 From 58d8ae3ea40dede3e9ddb57ae0814eb7237fa92d Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Mon, 26 Sep 2016 10:53:59 +0000 Subject: [PATCH 3/3] Review comments --- integration/110_shutdown_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration/110_shutdown_test.sh b/integration/110_shutdown_test.sh index a62c2392d..05330fbc6 100755 --- a/integration/110_shutdown_test.sh +++ b/integration/110_shutdown_test.sh @@ -2,13 +2,13 @@ . ./config.sh -start_suite "Check scope exits cleanly within 10 seconds" +start_suite "Check scope exits cleanly within 5 seconds" scope_on $HOST1 launch -sleep 10 +sleep 5 scope_on $HOST1 stop -sleep 10 +sleep 5 # Save stdout for debugging output exec 3>&1