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.
This commit is contained in:
Oran Agra 2020-07-13 16:09:08 +03:00 committed by GitHub
parent 7f19a04f0f
commit 02ef355f98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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
}