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 {
150
150
channel .confirmSelect ();
151
151
assertThat (metrics .getPublishUnroutedMessages ().getCount (), is (1L ));
152
152
// when
153
+ channel .exchangeDeclare ("any-exchange" , "direct" );
153
154
channel .basicPublish (
154
155
"any-exchange" ,
155
156
"any-routing-key" ,
156
157
MessageProperties .MINIMAL_BASIC ,
157
158
"any-message" .getBytes ()
158
159
);
159
- channel .waitForConfirms (30 * 60 * 1000 );
160
160
// then
161
+ waitAtMost (timeout ()).until (
162
+ () -> metrics .getPublishUnroutedMessages ().getCount (),
163
+ equalTo (1L )
164
+ );
161
165
assertThat (metrics .getPublishUnroutedMessages ().getCount (), is (1L ));
162
166
} finally {
163
167
safeClose (connection );
You can’t perform that action at this time.
0 commit comments