You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/03/09 21:20:27 UTC
[GitHub] [james-project] jeantil commented on a change in pull request #905: [JAMES-3721] Fixes ObjectNotFoundExceptions when browsing mails
jeantil commented on a change in pull request #905:
URL: https://github.com/apache/james-project/pull/905#discussion_r823100224
##########
File path: server/queue/queue-api/src/test/java/org/apache/james/queue/api/ManageableMailQueueContract.java
##########
@@ -137,6 +137,23 @@ default void browseShouldReturnSingleElement() throws Exception {
.containsExactly("name");
}
+ @Test
+ default void browseShouldReturnEmptyWhenSingleDequeueMessage() throws Exception {
Review comment:
So I had a quick look at the actual stacktrace :
```
com.rabbitmq.client.AlreadyClosedException: channel is already closed due to clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0)
at com.rabbitmq.client.impl.AMQChannel.ensureIsOpen(AMQChannel.java:258)
at com.rabbitmq.client.impl.AMQChannel.transmit(AMQChannel.java:427)
at com.rabbitmq.client.impl.AMQChannel.transmit(AMQChannel.java:421)
at com.rabbitmq.client.impl.recovery.RecoveryAwareChannelN.basicAck(RecoveryAwareChannelN.java:93)
at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.basicAck(AutorecoveringChannel.java:439)
at reactor.rabbitmq.AcknowledgableDelivery.basicAck(AcknowledgableDelivery.java:110)
at reactor.rabbitmq.AcknowledgableDelivery.ack(AcknowledgableDelivery.java:62)
... 16 common frames omitted
Wrapped by: reactor.rabbitmq.RabbitFluxException: Not retryable exception, cannot retry
at reactor.rabbitmq.ExceptionHandlers$SimpleRetryTemplate.retry(ExceptionHandlers.java:125)
at reactor.rabbitmq.ExceptionHandlers$RetryAcknowledgmentExceptionHandler.accept(ExceptionHandlers.java:143)
at reactor.rabbitmq.ExceptionHandlers$RetryAcknowledgmentExceptionHandler.accept(ExceptionHandlers.java:130)
at reactor.rabbitmq.AcknowledgableDelivery.retry(AcknowledgableDelivery.java:130)
at reactor.rabbitmq.AcknowledgableDelivery.ack(AcknowledgableDelivery.java:64)
at reactor.rabbitmq.AcknowledgableDelivery.ack(AcknowledgableDelivery.java:76)
at org.apache.james.queue.rabbitmq.Dequeuer.lambda$ack$4(Dequeuer.java:130)
at com.github.fge.lambdas.consumers.ThrowingConsumer.accept(ThrowingConsumer.java:22)
at org.apache.james.queue.rabbitmq.Dequeuer$RabbitMQMailQueueItem.done(Dequeuer.java:75)
at org.apache.james.queue.api.RawMailQueueItem.done(RawMailQueueItem.java:39)
at org.apache.james.queue.api.MailQueueContract.lambda$dequeueShouldBeConcurrent$7(MailQueueContract.java:581)
```
looking at other tests, it looks like
```
Flux.from(getManageableMailQueue().deQueue())
.doOnNext(Throwing.consumer(item -> item.done(true)))
.blockFirst();
```
works but
```
MailQueue.MailQueueItem mailQueueItem = Flux.from(getMailQueue().deQueue()).blockFirst();
mailQueueItem.done(true);
```
doesn't for the rabbitmq implementation. I find that surprising as nothing indicates a depency on some kind of context but I have aligned the test with the existing suite and it passes locally
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org