diff options
author | Oran Agra <oran@redislabs.com> | 2020-08-31 11:24:17 +0300 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2020-09-06 09:59:19 +0300 |
commit | fe5da2e60d8d6d907062f4789673fbe06fa8773e (patch) | |
tree | 9ae5e4727df3803385cc669599c0f982ff1d3f35 /tests/support/test.tcl | |
parent | 1b7ba44e7917082ac6d5523666d3b4ab210dfbad (diff) | |
download | redis-fe5da2e60d8d6d907062f4789673fbe06fa8773e.tar.gz |
test infra - add durable mode to work around test suite crashing
in some cases a command that returns an error possibly due to a timing
issue causes the tcl code to crash and thus prevents the rest of the
tests from running. this adds an option to make the test proceed despite
the crash.
maybe it should be the default mode some day.
Diffstat (limited to 'tests/support/test.tcl')
-rw-r--r-- | tests/support/test.tcl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/support/test.tcl b/tests/support/test.tcl index 773461abb..f5b4c8bef 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -149,9 +149,13 @@ proc test {name code {okpattern undefined} {options undefined}} { send_data_packet $::test_server_fd testing $name if {[catch {set retval [uplevel 1 $code]} error]} { - if {[string match "assertion:*" $error]} { + set assertion [string match "assertion:*" $error] + if {$assertion || $::durable} { set msg [string range $error 10 end] lappend details $msg + if {!$assertion} { + lappend details $::errorInfo + } lappend ::tests_failed $details incr ::num_failed |