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.
This commit is contained in:
Binbin 2024-02-15 16:44:49 +08:00 committed by GitHub
parent c1d2ac2a73
commit 32f44da510
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -2009,9 +2009,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