Skip to content

Commit

Permalink
tests: stop network before reading logs
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Aug 19, 2022
1 parent bf7aaec commit 38472f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/e2e-go/cli/goal/expect/goalExpectCommon.exp
Original file line number Diff line number Diff line change
Expand Up @@ -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] } {
Expand All @@ -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]
Expand All @@ -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
Expand Down

0 comments on commit 38472f3

Please sign in to comment.