From e8587c58fae7ab9173c8130c7885f0425651121b Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Thu, 15 Oct 2020 11:51:37 -0500 Subject: [PATCH] speed up envoy integ tests by not politely stopping containers before destroying them (#8969) In local testing this sped up the stop_services call from 11s to 1s per test. --- test/integration/connect/envoy/run-tests.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/integration/connect/envoy/run-tests.sh b/test/integration/connect/envoy/run-tests.sh index 471b58037..09bfb6e89 100755 --- a/test/integration/connect/envoy/run-tests.sh +++ b/test/integration/connect/envoy/run-tests.sh @@ -72,7 +72,8 @@ function start_consul { local DC=${1:-primary} # Start consul now as setup script needs it up - docker-compose rm -s -v -f consul-${DC} || true + docker-compose kill consul-${DC} || true + docker-compose rm -v -f consul-${DC} || true docker-compose up -d consul-${DC} } @@ -95,7 +96,8 @@ function start_services { # Start containers required if [ ! -z "$REQUIRED_SERVICES" ] ; then - docker-compose rm -s -v -f $REQUIRED_SERVICES || true + docker-compose kill $REQUIRED_SERVICES || true + docker-compose rm -v -f $REQUIRED_SERVICES || true docker-compose up --build -d $REQUIRED_SERVICES fi @@ -112,7 +114,8 @@ function verify { res=0 # Nuke any previous case's verify container. - docker-compose rm -s -v -f verify-${DC} || true + docker-compose kill verify-${DC} || true + docker-compose rm -v -f verify-${DC} || true if docker-compose up --abort-on-container-exit --exit-code-from verify-${DC} verify-${DC} ; then echogreen "✓ PASS" @@ -156,7 +159,8 @@ function stop_services { if [ -f "${CASE_DIR}/teardown.sh" ] ; then source "${CASE_DIR}/teardown.sh" fi - docker-compose rm -s -v -f $REQUIRED_SERVICES || true + docker-compose kill $REQUIRED_SERVICES || true + docker-compose rm -v -f $REQUIRED_SERVICES || true } function init_vars {