From 5f8c57f28a297dc3b27e125672c833379450497b Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 16 Feb 2018 12:10:40 +0100 Subject: [PATCH] CG: test XACK ability to remove items from the PELs. --- tests/unit/type/stream-cgroups.tcl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/unit/type/stream-cgroups.tcl b/tests/unit/type/stream-cgroups.tcl index 738ea3720..8b22405aa 100644 --- a/tests/unit/type/stream-cgroups.tcl +++ b/tests/unit/type/stream-cgroups.tcl @@ -58,4 +58,17 @@ start_server { set pending [r XPENDING mystream mygroup - + 10 client-1] assert {[llength $pending] == 2} } + + test {XACK is able to remove items from the client/group PEL} { + set pending [r XPENDING mystream mygroup - + 10 client-1] + set id1 [lindex $pending 0 0] + set id2 [lindex $pending 1 0] + assert {[r XACK mystream mygroup $id1] eq 1} + set pending [r XPENDING mystream mygroup - + 10 client-1] + assert {[llength $pending] == 1} + set id [lindex $pending 0 0] + assert {$id eq $id2} + set global_pel [r XPENDING mystream mygroup - + 10] + assert {[llength $global_pel] == 3} + } }