summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2021-12-22 23:37:12 +0200
committerGitHub <noreply@github.com>2021-12-22 23:37:12 +0200
commitb7567394e1802906904fc380f95c05367e1f0c3f (patch)
tree2cd5055381ccca1a4f312a14e878a4865a9985a7 /tests/integration
parente33e0295bb18be14eee1f3ff162dff9522e37e20 (diff)
downloadredis-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/integration')
-rw-r--r--tests/integration/replication.tcl8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
index d53619702..c721d5c4c 100644
--- a/tests/integration/replication.tcl
+++ b/tests/integration/replication.tcl
@@ -515,7 +515,7 @@ foreach testType {Successful Aborted} {
# Put different data sets on the master and replica
# We need to put large keys on the master since the replica replies to info only once in 2mb
$replica debug populate 2000 slave 10
- $master debug populate 1000 master 100000
+ $master debug populate 2000 master 100000
$master config set rdbcompression no
# Set a key value on replica to check status during loading, on failure and after swapping db
@@ -540,8 +540,8 @@ foreach testType {Successful Aborted} {
switch $testType {
"Aborted" {
# Set master with a slow rdb generation, so that we can easily intercept loading
- # 30ms per key, with 1000 keys is 30 seconds
- $master config set rdb-key-save-delay 30000
+ # 10ms per key, with 2000 keys is 20 seconds
+ $master config set rdb-key-save-delay 10000
test {Diskless load swapdb (async_loading): replica enter async_loading} {
# Wait for the replica to start reading the rdb
@@ -628,7 +628,7 @@ foreach testType {Successful Aborted} {
assert_equal [$replica fcall test 0] "hello2"
# Make sure amount of keys matches master
- assert_equal [$replica dbsize] 1010
+ assert_equal [$replica dbsize] 2010
}
}
}