summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-11-04 18:05:46 +0100
committerantirez <antirez@gmail.com>2017-11-04 18:05:46 +0100
commit2970181ff236f591bb0adcfcc367c398da9a1a90 (patch)
treefb7cf4c8d2e95aa1867f2fcb37ad067d525df9d3
parent55c2e11ebc877bd72ef2934a9defe257e3d166bf (diff)
downloadredis-2970181ff236f591bb0adcfcc367c398da9a1a90.tar.gz
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.
-rw-r--r--tests/unit/type/stream.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/type/stream.tcl b/tests/unit/type/stream.tcl
index 06f31e08c..5c58e7fb2 100644
--- a/tests/unit/type/stream.tcl
+++ b/tests/unit/type/stream.tcl
@@ -149,7 +149,7 @@ start_server {
test {XREAD with non empty second stream} {
set res [r XREAD COUNT 1 STREAMS nostream mystream 0.0 0.0]
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} {