public async Task DeadLetterMessageAsync_should_remove_from_processing_queue_and_put_message_in_deadletter_queue() { //Arrange var message = await SendAndGetMessage(); //Act await _target.DeadletterMessageAsync(message, 1); //Assert var processingQueueLength = await RedisTestBase.Database.ListLengthAsync(RedisQueueConventions.GetProcessingQueueName(_queueName)); processingQueueLength.Should().Be(0); var deadLetterQueueLength = await RedisTestBase.Database.ListLengthAsync(RedisQueueConventions.GetDeadLetterQueueName(_queueName)); deadLetterQueueLength.Should().Be(1); }
public async Task RequeueDeadletterAsync_should_requeue_message_remove_errors_and_delivery_count() { //Arrange var message = await SendAndGetMessage(); await _target.DeadletterMessageAsync(message, 1); //Act await _target.RequeueDeadletterAsync(); //Assert var deadLetterQueueLength = await RedisTestBase.Database.ListLengthAsync(RedisQueueConventions.GetDeadLetterQueueName(_queueName)); deadLetterQueueLength.Should().Be(0); var queueLength = await RedisTestBase.Database.ListLengthAsync(_queueName); queueLength.Should().Be(1); }