summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-10-17 12:11:06 +0200
committerantirez <antirez@gmail.com>2018-10-17 12:11:10 +0200
commit56871aeb600c19a0ec4d06a60cfc19a9fdf7b1e1 (patch)
tree0d0721cd0be4eed5a028390f64b29c64cbf9d855 /tests/unit
parent492fd5c01105ee5dc1aa73a0f19a7201e86b9815 (diff)
downloadredis-56871aeb600c19a0ec4d06a60cfc19a9fdf7b1e1.tar.gz
Tests for XGROUP CREATE MKSTREAM.
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/type/stream-cgroups.tcl11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/type/stream-cgroups.tcl b/tests/unit/type/stream-cgroups.tcl
index 4df16c1a4..d2e0d6539 100644
--- a/tests/unit/type/stream-cgroups.tcl
+++ b/tests/unit/type/stream-cgroups.tcl
@@ -9,6 +9,17 @@ start_server {
set err
} {BUSYGROUP*}
+ test {XGROUP CREATE: automatic stream creation fails without MKSTREAM} {
+ r DEL mystream
+ catch {r XGROUP CREATE mystream mygroup $} err
+ set err
+ } {ERR*}
+
+ test {XGROUP CREATE: automatic stream creation works with MKSTREAM} {
+ r DEL mystream
+ r XGROUP CREATE mystream mygroup $ MKSTREAM
+ } {OK}
+
test {XREADGROUP will return only new elements} {
r XADD mystream * a 1
r XADD mystream * b 2