Fix flaky PTTL time to live in milliseconds test on slow machines (#11651)
This test failed in FreeBSD: ``` *** [err]: PTTL returns time to live in milliseconds in tests/unit/expire.tcl Expected 836 > 900 && 836 <= 1000 (context: type eval line 5 cmd {assert {$ttl > 900 && $ttl <= 1000}} proc ::test) ``` On some slow machines, sometimes the test take close to 200ms to finish. We only set aside 100ms, so that caused the failure. Since the failure was around 800, change the condition to be >500.
This commit is contained in:
parent
9c7c6924a0
commit
9b20d598a5
@ -151,7 +151,7 @@ start_server {tags {"expire"}} {
|
||||
r del x
|
||||
r setex x 1 somevalue
|
||||
set ttl [r pttl x]
|
||||
assert {$ttl > 900 && $ttl <= 1000}
|
||||
assert {$ttl > 500 && $ttl <= 1000}
|
||||
}
|
||||
|
||||
test {TTL / PTTL / EXPIRETIME / PEXPIRETIME return -1 if key has no expire} {
|
||||
|
Loading…
x
Reference in New Issue
Block a user