Skip to content

Commit 47e5e17

Browse files
committed
Fix a ListenerExecutionFailedException usage
https://build.spring.io/browse/AMQP-AMQP21X-55/
1 parent c9fd46f commit 47e5e17

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/ContainerUtilsTests.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@
2424

2525
import org.springframework.amqp.AmqpRejectAndDontRequeueException;
2626
import org.springframework.amqp.ImmediateRequeueAmqpException;
27-
import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException;
27+
import org.springframework.amqp.core.Message;
28+
import org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException;
2829

2930
/**
3031
* @author Gary Russell
32+
* @author Artem Bilan
33+
*
3134
* @since 2.1.8
3235
*
3336
*/
@@ -36,17 +39,19 @@ public class ContainerUtilsTests {
3639
@Test
3740
void testMustRequeue() {
3841
assertThat(ContainerUtils.shouldRequeue(false,
39-
new ListenerExecutionFailedException("", new ImmediateRequeueAmqpException("requeue")),
42+
new ListenerExecutionFailedException("", new ImmediateRequeueAmqpException("requeue"),
43+
mock(Message.class)),
4044
mock(Log.class)))
41-
.isTrue();
45+
.isTrue();
4246
}
4347

4448
@Test
4549
void testMustNotRequeue() {
4650
assertThat(ContainerUtils.shouldRequeue(true,
47-
new ListenerExecutionFailedException("", new AmqpRejectAndDontRequeueException("no requeue")),
51+
new ListenerExecutionFailedException("", new AmqpRejectAndDontRequeueException("no requeue"),
52+
mock(Message.class)),
4853
mock(Log.class)))
49-
.isFalse();
54+
.isFalse();
5055
}
5156

5257
}

0 commit comments

Comments
 (0)