From 54b9a0e61283fa41aa39fe00726fd29c0dd694e3 Mon Sep 17 00:00:00 2001
From: antirez <antirez@gmail.com>
Date: Fri, 16 Feb 2018 12:13:04 +0100
Subject: [PATCH] CG: test XACK remaining features.

---
 tests/unit/type/stream-cgroups.tcl | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/unit/type/stream-cgroups.tcl b/tests/unit/type/stream-cgroups.tcl
index 8b22405aa..3f72b3dbb 100644
--- a/tests/unit/type/stream-cgroups.tcl
+++ b/tests/unit/type/stream-cgroups.tcl
@@ -71,4 +71,14 @@ start_server {
         set global_pel [r XPENDING mystream mygroup - + 10]
         assert {[llength $global_pel] == 3}
     }
+
+    test {XACK can't remove the same item multiple times} {
+        assert {[r XACK mystream mygroup $id1] eq 0}
+    }
+
+    test {XACK is able to accept multiple arguments} {
+        # One of the IDs was already removed, so it should ack
+        # just ID2.
+        assert {[r XACK mystream mygroup $id1 $id2] eq 1}
+    }
 }