From 02ef355f98691adba4126bbdab0d4d2bfe475701 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Mon, 13 Jul 2020 16:09:08 +0300 Subject: [PATCH] runtest --stop pause stops before terminating the redis server (#7513) in the majority of the cases (on this rarely used feature) we want to stop and be able to connect to the shard with redis-cli. since these are two different processes interracting with the tty we need to stop both, and we'll have to hit enter twice, but it's not that bad considering it is rarely used. --- tests/support/test.tcl | 6 ++++++ tests/test_helper.tcl | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/support/test.tcl b/tests/support/test.tcl index 5e8916236..a5573f583 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -153,6 +153,12 @@ proc test {name code {okpattern undefined}} { incr ::num_failed send_data_packet $::test_server_fd err [join $details "\n"] + + if {$::stop_on_failure} { + puts "Test error (last server port:[srv port], log:[srv stdout]), press enter to teardown the test." + flush stdout + gets stdin + } } else { # Re-raise, let handler up the stack take care of this. error $error $::errorInfo diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl index 51c364601..7ce0d545e 100644 --- a/tests/test_helper.tcl +++ b/tests/test_helper.tcl @@ -359,8 +359,8 @@ proc read_from_test_client fd { puts $err lappend ::failed_tests $err set ::active_clients_task($fd) "(ERR) $data" - if {$::stop_on_failure} { - puts -nonewline "(Test stopped, press enter to continue)" + if {$::stop_on_failure} { + puts -nonewline "(Test stopped, press enter to resume the tests)" flush stdout gets stdin }