Skip to content

Commit d645969

Browse files
committed
Fix QueueParserIntegrationTests for long of message_count
1 parent f486a30 commit d645969

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/QueueParserIntegrationTests.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
* @author Dave Syer
3939
* @author Gary Russell
4040
* @author Gunnar Hillert
41+
* @author Artem Bilan
42+
*
4143
* @since 1.0
4244
*
4345
*/
@@ -47,15 +49,14 @@ public final class QueueParserIntegrationTests {
4749
private DefaultListableBeanFactory beanFactory;
4850

4951
@BeforeEach
50-
public void setUpDefaultBeanFactory() throws Exception {
52+
public void setUpDefaultBeanFactory() {
5153
beanFactory = new DefaultListableBeanFactory();
5254
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(beanFactory);
5355
reader.loadBeanDefinitions(new ClassPathResource(getClass().getSimpleName() + "-context.xml", getClass()));
5456
}
5557

5658
@Test
57-
public void testArgumentsQueue() throws Exception {
58-
59+
public void testArgumentsQueue() {
5960
Queue queue = beanFactory.getBean("arguments", Queue.class);
6061
assertThat(queue).isNotNull();
6162
CachingConnectionFactory connectionFactory = new CachingConnectionFactory(
@@ -67,9 +68,9 @@ public void testArgumentsQueue() throws Exception {
6768

6869
assertThat(queue.getArguments().get("x-message-ttl")).isEqualTo(100L);
6970
template.convertAndSend(queue.getName(), "message");
70-
await().with().pollInterval(Duration.ofMillis(50))
71+
await().with().pollInterval(Duration.ofMillis(500))
7172
.until(() -> rabbitAdmin.getQueueProperties("arguments")
72-
.get(RabbitAdmin.QUEUE_MESSAGE_COUNT).equals(0));
73+
.get(RabbitAdmin.QUEUE_MESSAGE_COUNT).equals(0L));
7374
connectionFactory.destroy();
7475
RabbitAvailableCondition.getBrokerRunning().deleteQueues("arguments");
7576
}

0 commit comments

Comments
 (0)