File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/test/java/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -150,14 +150,18 @@ protected void releaseResources() throws IOException {
150150 channel .confirmSelect ();
151151 assertThat (metrics .getPublishUnroutedMessages ().getCount (), is (1L ));
152152 // when
153+ channel .exchangeDeclare ("any-exchange" , "direct" );
153154 channel .basicPublish (
154155 "any-exchange" ,
155156 "any-routing-key" ,
156157 MessageProperties .MINIMAL_BASIC ,
157158 "any-message" .getBytes ()
158159 );
159- channel .waitForConfirms (30 * 60 * 1000 );
160160 // then
161+ waitAtMost (timeout ()).until (
162+ () -> metrics .getPublishUnroutedMessages ().getCount (),
163+ equalTo (1L )
164+ );
161165 assertThat (metrics .getPublishUnroutedMessages ().getCount (), is (1L ));
162166 } finally {
163167 safeClose (connection );
You can’t perform that action at this time.
0 commit comments