$connection->
reject($failing['id'
]);
$connection = Connection::
fromDsn('redis://localhost/messenger-rejectthenget',
['sentinel_master' => null
]);
$this->
assertNotNull($connection->
get());
$redis->
del('messenger-rejectthenget'
);
} public function testItProperlyHandlesEmptyMessages() { $redisReceiver =
new RedisReceiver($this->connection,
new Serializer());
$this->connection->
add('{"message": "Hi1"}',
['type' => DummyMessage::
class]);
$this->connection->
add('{"message": "Hi2"}',
['type' => DummyMessage::
class]);
$redisReceiver->
get();
$this->redis->
xtrim('messages', 1
);
// The consumer died during handling a message while performing xtrim in parallel process
$this->redis =
new \
Redis();
$this->connection = Connection::
fromDsn(getenv('MESSENGER_REDIS_DSN'
),
['delete_after_ack' => true
],
$this->redis
);
$redisReceiver =
new RedisReceiver($this->connection,
new Serializer());