diff options
author | Oran Agra <oran@redislabs.com> | 2022-01-26 19:45:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-26 19:45:31 +0200 |
commit | da48a81290be9c49889272bfcaf8b67544daf82b (patch) | |
tree | 47046faef1b9e196193d98e44353e35db517d388 /tests/integration/replication-4.tcl | |
parent | c79389f032bcc90a5958f887503124b6c86aee5f (diff) | |
download | redis-da48a81290be9c49889272bfcaf8b67544daf82b.tar.gz |
solve race in expiration test (#10192)
Failed on a non-valgrind run. on this line:
```
assert_equal 0 [$slave exists k]
```
the condition in `keyIsExpired` is `now > when`.
so if the test is really fast, maybe it can get to EXISTS exactly 1000 milliseconds after the
expiration was set, and the key isn't yet gone)
Diffstat (limited to 'tests/integration/replication-4.tcl')
-rw-r--r-- | tests/integration/replication-4.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/replication-4.tcl b/tests/integration/replication-4.tcl index 2d3d93222..8cccd9678 100644 --- a/tests/integration/replication-4.tcl +++ b/tests/integration/replication-4.tcl @@ -103,12 +103,12 @@ start_server {tags {"repl external:skip"}} { wait_for_ofs_sync $master $slave exec kill -SIGSTOP [srv 0 pid] $master incr k - after 1000 + after 1001 # Stopping the replica for one second to makes sure the INCR arrives # to the replica after the key is logically expired. exec kill -SIGCONT [srv 0 pid] wait_for_ofs_sync $master $slave - # Check that k is locigally expired but is present in the replica. + # Check that k is logically expired but is present in the replica. assert_equal 0 [$slave exists k] $slave debug object k ; # Raises exception if k is gone. } |