Commit 8d3a1c97 authored by Binbin's avatar Binbin Committed by YaacovHazan
Browse files

Increase tolerance range to block reprocess tests to avoid timing issues (#13053)

These tests have all failed in daily CI:
```
*** [err]: Blocking XREADGROUP for stream key that has clients blocked on stream - reprocessing command in tests/unit/type/stream-cgroups.tcl
Expected '1101' to be between to '1000' and '1100' (context: type eval line 23 cmd {assert_range [expr $end-$start] 1000 1100} proc ::test)

*** [err]: BLPOP unblock but the key is expired and then block again - reprocessing command in tests/unit/type/list.tcl
Expected '1101' to be between to '1000' and '1100' (context: type eval line 23 cmd {assert_range [expr $end-$start] 1000 1100} proc ::test)

*** [err]: BZPOPMIN unblock but the key is expired and then block again - reprocessing command in tests/unit/type/zset.tcl
Expected '1103' to be between to '1000' and '1100' (context: type eval line 23 cmd {assert_range [expr $end-$start] 1000 1100} proc ::test)
```

Increase the range to avoid failures, and improve the comment to be
clearer.
tests was introduced in #13004.

(cherry picked from commit 32f44da5)
parent c34e6484
......@@ -1265,9 +1265,9 @@ foreach {pop} {BLPOP BLMPOP_LEFT} {
assert_equal {} [$rd read]
set end [clock milliseconds]
# In the past, this time would have been 1000+200, in order to avoid
# timing issues, we increase the range a bit.
assert_range [expr $end-$start] 1000 1100
# Before the fix in #13004, this time would have been 1200+ (i.e. more than 1200ms),
# now it should be 1000, but in order to avoid timing issues, we increase the range a bit.
assert_range [expr $end-$start] 1000 1150
r debug set-active-expire 1
$rd close
......
......@@ -518,9 +518,9 @@ start_server {
assert_equal {} [$rd2 read]
set end [clock milliseconds]
# In the past, this time would have been 1000+200, in order to avoid
# timing issues, we increase the range a bit.
assert_range [expr $end-$start] 1000 1100
# Before the fix in #13004, this time would have been 1200+ (i.e. more than 1200ms),
# now it should be 1000, but in order to avoid timing issues, we increase the range a bit.
assert_range [expr $end-$start] 1000 1150
$rd1 close
$rd2 close
......
......@@ -1962,9 +1962,9 @@ start_server {tags {"zset"}} {
assert_equal {} [$rd read]
set end [clock milliseconds]
# In the past, this time would have been 1000+200, in order to avoid
# timing issues, we increase the range a bit.
assert_range [expr $end-$start] 1000 1100
# Before the fix in #13004, this time would have been 1200+ (i.e. more than 1200ms),
# now it should be 1000, but in order to avoid timing issues, we increase the range a bit.
assert_range [expr $end-$start] 1000 1150
r debug set-active-expire 1
$rd close
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment