@@ -154,7 +154,7 @@ public function testKeepGettingPendingMessages()
154
154
$ redis = $ this ->createMock (\Redis::class);
155
155
156
156
$ redis ->expects ($ this ->exactly (3 ))->method ('xreadgroup ' )
157
- ->with ('symfony ' , 'consumer ' , ['queue ' => 0 ], 1 , null )
157
+ ->with ('symfony ' , 'consumer ' , ['queue ' => 0 ], 1 , 1 )
158
158
->willReturn (['queue ' => [['message ' => json_encode (['body ' => 'Test ' , 'headers ' => []])]]]);
159
159
160
160
$ connection = Connection::fromDsn ('redis://localhost/queue ' , ['delete_after_ack ' => true ], $ redis );
@@ -250,7 +250,7 @@ public function testGetPendingMessageFirst()
250
250
$ redis = $ this ->createMock (\Redis::class);
251
251
252
252
$ redis ->expects ($ this ->exactly (1 ))->method ('xreadgroup ' )
253
- ->with ('symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , null )
253
+ ->with ('symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , 1 )
254
254
->willReturn (['queue ' => [['message ' => '{"body":"1","headers":[]} ' ]]]);
255
255
256
256
$ connection = Connection::fromDsn ('redis://localhost/queue ' , ['delete_after_ack ' => true ], $ redis );
@@ -275,11 +275,11 @@ public function testClaimAbandonedMessageWithRaceCondition()
275
275
->willReturnCallback (function (...$ args ) {
276
276
static $ series = [
277
277
// first call for pending messages
278
- [['symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , null ], []],
278
+ [['symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , 1 ], []],
279
279
// second call because of claimed message (redisid-123)
280
- [['symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , null ], []],
280
+ [['symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , 1 ], []],
281
281
// third call because of no result (other consumer claimed message redisid-123)
282
- [['symfony ' , 'consumer ' , ['queue ' => '> ' ], 1 , null ], []],
282
+ [['symfony ' , 'consumer ' , ['queue ' => '> ' ], 1 , 1 ], []],
283
283
];
284
284
285
285
[$ expectedArgs , $ return ] = array_shift ($ series );
@@ -311,9 +311,9 @@ public function testClaimAbandonedMessage()
311
311
->willReturnCallback (function (...$ args ) {
312
312
static $ series = [
313
313
// first call for pending messages
314
- [['symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , null ], []],
314
+ [['symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , 1 ], []],
315
315
// second call because of claimed message (redisid-123)
316
- [['symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , null ], ['queue ' => [['message ' => '{"body":"1","headers":[]} ' ]]]],
316
+ [['symfony ' , 'consumer ' , ['queue ' => '0 ' ], 1 , 1 ], ['queue ' => [['message ' => '{"body":"1","headers":[]} ' ]]]],
317
317
];
318
318
319
319
[$ expectedArgs , $ return ] = array_shift ($ series );
0 commit comments