diff options
author | Oran Agra <oran@redislabs.com> | 2021-12-22 23:37:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 23:37:12 +0200 |
commit | b7567394e1802906904fc380f95c05367e1f0c3f (patch) | |
tree | 2cd5055381ccca1a4f312a14e878a4865a9985a7 /tests/support/test.tcl | |
parent | e33e0295bb18be14eee1f3ff162dff9522e37e20 (diff) | |
download | redis-b7567394e1802906904fc380f95c05367e1f0c3f.tar.gz |
resolve replication test timing sensitivity - 2nd attempt (#9988)
issue started failing after #9878 was merged (made an exiting test more sensitive)
looks like #9982 didn't help, tested this one and it seems to work better.
this commit does two things:
1. reduce the extra delay i added earlier and instead add more keys, the effect no duration
of replication is the same, but the intervals in which the server is responsive to the tcl client is higher.
2. improve the test infra to print context when assert_error fails.
Diffstat (limited to 'tests/support/test.tcl')
-rw-r--r-- | tests/support/test.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/support/test.tcl b/tests/support/test.tcl index a4fec1564..b35b29185 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -76,11 +76,11 @@ proc assert_range {value min max {detail ""}} { } } -proc assert_error {pattern code} { +proc assert_error {pattern code {detail ""}} { if {[catch {uplevel 1 $code} error]} { assert_match $pattern $error } else { - error "assertion:Expected an error but nothing was caught" + assert_failed "assertion:Expected an error but nothing was caught" $detail } } |