@@ -3212,6 +3212,29 @@ public void xPendingShouldLoadPendingMessages() {
3212
3212
assertThat (pending .get (0 ).getIdAsString ()).isNotNull ();
3213
3213
}
3214
3214
3215
+ @ Test // DATAREDIS-1207
3216
+ @ IfProfileValue (name = "redisVersion" , value = "5.0" )
3217
+ @ WithRedisDriver ({ RedisDriver .LETTUCE })
3218
+ public void xPendingShouldWorkWithBoundedRange () {
3219
+
3220
+ actual .add (connection .xAdd (KEY_1 , Collections .singletonMap (KEY_2 , VALUE_2 )));
3221
+ actual .add (connection .xGroupCreate (KEY_1 , ReadOffset .from ("0" ), "my-group" ));
3222
+ actual .add (connection .xReadGroupAsString (Consumer .from ("my-group" , "my-consumer" ),
3223
+ StreamOffset .create (KEY_1 , ReadOffset .lastConsumed ())));
3224
+
3225
+ actual .add (connection .xPending (KEY_1 , "my-group" , org .springframework .data .domain .Range .open ("0-0" , "+" ), 10L ));
3226
+
3227
+ List <Object > results = getResults ();
3228
+ assertThat (results ).hasSize (4 );
3229
+ PendingMessages pending = (PendingMessages ) results .get (3 );
3230
+
3231
+ assertThat (pending .size ()).isOne ();
3232
+ assertThat (pending .get (0 ).getConsumerName ()).isEqualTo ("my-consumer" );
3233
+ assertThat (pending .get (0 ).getGroupName ()).isEqualTo ("my-group" );
3234
+ assertThat (pending .get (0 ).getTotalDeliveryCount ()).isOne ();
3235
+ assertThat (pending .get (0 ).getIdAsString ()).isNotNull ();
3236
+ }
3237
+
3215
3238
@ Test // DATAREDIS-1084
3216
3239
@ IfProfileValue (name = "redisVersion" , value = "5.0" )
3217
3240
@ WithRedisDriver ({ RedisDriver .LETTUCE })
0 commit comments