summaryrefslogtreecommitdiff
path: root/tests/support/util.tcl
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2022-02-13 15:52:38 +0800
committerGitHub <noreply@github.com>2022-02-13 09:52:38 +0200
commit62c8be28ee7d15f90103f52bcf4a4c91f9ba7396 (patch)
treeaf314f7d8d18fc7023a661f85c0f8b6cf7b72685 /tests/support/util.tcl
parent2eb9b19612db39b1bb91902c9669e28883bbbee7 (diff)
downloadredis-62c8be28ee7d15f90103f52bcf4a4c91f9ba7396.tar.gz
Regression test for sync psync crash (#10288)
Added regression tests for #10020 / #10081 / #10243. The above PRs fixed some crashes due to an asserting, see function `clientHasPendingReplies` (introduced in #9166). This commit added some tests to cover the above scenario. These tests will all fail in #9166, althought fixed not, there is value in adding these tests to cover and verify the changes. And it also can cover #8868 (verify the logs). Other changes: 1. Reduces the wait time in `waitForBgsave` and `waitForBgrewriteaof` from 1s to 50ms, which should reduce the time for some tests. 2. Improve the test infra to print context when `assert_match` fails. 3. Improve the test infra to print `$error` when `assert_error` fails. ``` Expected an error matching 'ERR*' but got 'OK' (context: type eval line 4 cmd {assert_error "ERR*" {r set a b}} proc ::test) ```
Diffstat (limited to 'tests/support/util.tcl')
-rw-r--r--tests/support/util.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/support/util.tcl b/tests/support/util.tcl
index 9d1a127ed..46c9654c8 100644
--- a/tests/support/util.tcl
+++ b/tests/support/util.tcl
@@ -89,7 +89,7 @@ proc waitForBgsave r {
puts -nonewline "\nWaiting for background save to finish... "
flush stdout
}
- after 1000
+ after 50
} else {
break
}
@@ -103,7 +103,7 @@ proc waitForBgrewriteaof r {
puts -nonewline "\nWaiting for background AOF rewrite to finish... "
flush stdout
}
- after 1000
+ after 50
} else {
break
}