From 7d50e19eab8dc09239a7e7d69eec4e72e155fae1 Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy <65323360+algorandskiy@users.noreply.github.com> Date: Fri, 19 Aug 2022 09:11:48 -0400 Subject: [PATCH] tests: stop network before reading logs (#4429) --- test/e2e-go/cli/goal/expect/goalExpectCommon.exp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e-go/cli/goal/expect/goalExpectCommon.exp b/test/e2e-go/cli/goal/expect/goalExpectCommon.exp index 0e3c8fc619..543a64802e 100644 --- a/test/e2e-go/cli/goal/expect/goalExpectCommon.exp +++ b/test/e2e-go/cli/goal/expect/goalExpectCommon.exp @@ -52,6 +52,8 @@ proc ::AlgorandGoal::Abort { ERROR } { puts "GLOBAL_TEST_ROOT_DIR $::GLOBAL_TEST_ROOT_DIR" puts "GLOBAL_NETWORK_NAME $::GLOBAL_NETWORK_NAME" + ::AlgorandGoal::StopNetwork $::GLOBAL_NETWORK_NAME $::GLOBAL_TEST_ROOT_DIR + log_user 1 set NODE_DATA_DIR $::GLOBAL_TEST_ROOT_DIR/Primary if { [file exists $NODE_DATA_DIR] } { @@ -74,13 +76,13 @@ proc ::AlgorandGoal::Abort { ERROR } { puts "\n$NODE_DATA_DIR/node.log:\r\n$nodeLog" set LOGS_COLLECTED 1 } - - ::AlgorandGoal::StopNetwork $::GLOBAL_NETWORK_NAME $::GLOBAL_TEST_ROOT_DIR } if { [info exists ::GLOBAL_TEST_ALGO_DIR] } { puts "GLOBAL_TEST_ALGO_DIR $::GLOBAL_TEST_ALGO_DIR" + ::AlgorandGoal::StopNode $::GLOBAL_TEST_ALGO_DIR + if { $LOGS_COLLECTED == 0 } { log_user 1 set outLog [exec cat $::GLOBAL_TEST_ALGO_DIR/algod-out.log] @@ -90,8 +92,6 @@ proc ::AlgorandGoal::Abort { ERROR } { set nodeLog [exec -- tail -n 50 $::GLOBAL_TEST_ALGO_DIR/node.log] puts "\n$::GLOBAL_TEST_ALGO_DIR/node.log:\r\n$nodeLog" } - - ::AlgorandGoal::StopNode $::GLOBAL_TEST_ALGO_DIR } exit 1