mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 01:20:50 +00:00
Streams: fix XREAD test broken after previous tests improvements.
10% of times the data is not just "item 0" but there is also the "otherfield" part. Use [lrange] to avoid the issue. This commit fixes #4416.
This commit is contained in:
parent
5082ec6419
commit
1898c50573
@ -149,7 +149,7 @@ start_server {
|
|||||||
test {XREAD with non empty second stream} {
|
test {XREAD with non empty second stream} {
|
||||||
set res [r XREAD COUNT 1 STREAMS nostream mystream 0.0 0.0]
|
set res [r XREAD COUNT 1 STREAMS nostream mystream 0.0 0.0]
|
||||||
assert {[lindex $res 0 0] eq {mystream}}
|
assert {[lindex $res 0 0] eq {mystream}}
|
||||||
assert {[lindex $res 0 1 0 1] eq {item 0}}
|
assert {[lrange [lindex $res 0 1 0 1] 0 1] eq {item 0}}
|
||||||
}
|
}
|
||||||
|
|
||||||
test {Blocking XREAD waiting new data} {
|
test {Blocking XREAD waiting new data} {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user