38
38
* @author Dave Syer
39
39
* @author Gary Russell
40
40
* @author Gunnar Hillert
41
+ * @author Artem Bilan
42
+ *
41
43
* @since 1.0
42
44
*
43
45
*/
@@ -47,15 +49,14 @@ public final class QueueParserIntegrationTests {
47
49
private DefaultListableBeanFactory beanFactory ;
48
50
49
51
@ BeforeEach
50
- public void setUpDefaultBeanFactory () throws Exception {
52
+ public void setUpDefaultBeanFactory () {
51
53
beanFactory = new DefaultListableBeanFactory ();
52
54
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader (beanFactory );
53
55
reader .loadBeanDefinitions (new ClassPathResource (getClass ().getSimpleName () + "-context.xml" , getClass ()));
54
56
}
55
57
56
58
@ Test
57
- public void testArgumentsQueue () throws Exception {
58
-
59
+ public void testArgumentsQueue () {
59
60
Queue queue = beanFactory .getBean ("arguments" , Queue .class );
60
61
assertThat (queue ).isNotNull ();
61
62
CachingConnectionFactory connectionFactory = new CachingConnectionFactory (
@@ -67,9 +68,9 @@ public void testArgumentsQueue() throws Exception {
67
68
68
69
assertThat (queue .getArguments ().get ("x-message-ttl" )).isEqualTo (100L );
69
70
template .convertAndSend (queue .getName (), "message" );
70
- await ().with ().pollInterval (Duration .ofMillis (50 ))
71
+ await ().with ().pollInterval (Duration .ofMillis (500 ))
71
72
.until (() -> rabbitAdmin .getQueueProperties ("arguments" )
72
- .get (RabbitAdmin .QUEUE_MESSAGE_COUNT ).equals (0 ));
73
+ .get (RabbitAdmin .QUEUE_MESSAGE_COUNT ).equals (0L ));
73
74
connectionFactory .destroy ();
74
75
RabbitAvailableCondition .getBrokerRunning ().deleteQueues ("arguments" );
75
76
}
0 commit comments