Skip to content

Commit c9761b2

Browse files
committed
Make test assertion more reliable
Asynchronous now. (cherry picked from commit b917cf4)
1 parent a5bab6b commit c9761b2

File tree

1 file changed

+1
-1
lines changed
  • src/test/java/com/rabbitmq/client/test/functional

1 file changed

+1
-1
lines changed

src/test/java/com/rabbitmq/client/test/functional/Metrics.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ protected void releaseResources() throws IOException {
176176
sendMessage(channel);
177177
channel.waitForConfirms(30 * 60 * 1000);
178178
// then
179-
assertThat(metrics.getPublishAcknowledgedMessages().getCount()).isEqualTo(1L);
179+
waitAtMost(Duration.ofSeconds(5), () -> metrics.getPublishAcknowledgedMessages().getCount() == 1);
180180
} finally {
181181
safeClose(connection);
182182
}

0 commit comments

Comments
 (0)