Skip to content

Commit 681075d

Browse files
garyrussellartembilan
authored andcommitted
Fix missed import after cherry-picking
1 parent c2b8124 commit 681075d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -73,6 +73,7 @@
7373
import org.springframework.amqp.core.BatchMessageListener;
7474
import org.springframework.amqp.core.Message;
7575
import org.springframework.amqp.core.MessageBuilder;
76+
import org.springframework.amqp.core.MessageListener;
7677
import org.springframework.amqp.core.MessagePostProcessor;
7778
import org.springframework.amqp.core.Queue;
7879
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
@@ -132,7 +133,7 @@ public void testInconsistentTransactionConfiguration() {
132133
container.setAcknowledgeMode(AcknowledgeMode.NONE);
133134
container.setTransactionManager(new TestTransactionManager());
134135
assertThatIllegalStateException()
135-
.isThrownBy(container::afterPropertiesSet);
136+
.isThrownBy(container::afterPropertiesSet);
136137
container.stop();
137138
singleConnectionFactory.destroy();
138139
}
@@ -146,7 +147,7 @@ public void testInconsistentAcknowledgeConfiguration() {
146147
container.setChannelTransacted(true);
147148
container.setAcknowledgeMode(AcknowledgeMode.NONE);
148149
assertThatIllegalStateException()
149-
.isThrownBy(container::afterPropertiesSet);
150+
.isThrownBy(container::afterPropertiesSet);
150151
container.stop();
151152
singleConnectionFactory.destroy();
152153
}
@@ -456,10 +457,10 @@ public void testWithConnectionPerListenerThread() throws Exception {
456457
CountDownLatch latch2 = new CountDownLatch(2);
457458
willAnswer(messageToConsumer(mockChannel1, container, false, latch1))
458459
.given(mockChannel1).basicConsume(anyString(), anyBoolean(), anyString(), anyBoolean(), anyBoolean(),
459-
anyMap(), any(Consumer.class));
460+
anyMap(), any(Consumer.class));
460461
willAnswer(messageToConsumer(mockChannel2, container, false, latch1))
461462
.given(mockChannel2).basicConsume(anyString(), anyBoolean(), anyString(), anyBoolean(), anyBoolean(),
462-
anyMap(), any(Consumer.class));
463+
anyMap(), any(Consumer.class));
463464
willAnswer(messageToConsumer(mockChannel1, container, true, latch2)).given(mockChannel1).basicCancel(anyString());
464465
willAnswer(messageToConsumer(mockChannel2, container, true, latch2)).given(mockChannel2).basicCancel(anyString());
465466

@@ -636,6 +637,7 @@ class DoNothingMPP implements MessagePostProcessor {
636637
public Message postProcessMessage(Message message) throws AmqpException {
637638
return message;
638639
}
640+
639641
}
640642
Container container = new Container();
641643

@@ -721,7 +723,7 @@ private Answer<Object> messageToConsumer(final Channel mockChannel, final Simple
721723

722724
}
723725

724-
private void waitForConsumersToStop(Set<?> consumers) throws Exception {
726+
private void waitForConsumersToStop(Set<?> consumers) {
725727
with().pollInterval(Duration.ofMillis(10)).atMost(Duration.ofSeconds(10))
726728
.until(() -> consumers.stream()
727729
.map(consumer -> TestUtils.getPropertyValue(consumer, "consumer"))

0 commit comments

Comments
 (0)