Skip to content

Commit 3f546aa

Browse files
committed
#354 | Assert counts
1 parent 1f1821f commit 3f546aa

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ protected void releaseResources() throws IOException {
148148
connection = connectionFactory.newConnection();
149149
Channel channel = connection.createChannel();
150150
channel.confirmSelect();
151-
assertThat(metrics.getPublishUnroutedMessages(), is(1L));
151+
assertThat(metrics.getPublishUnroutedMessages().getCount(), is(1L));
152152
// when
153153
channel.basicPublish(
154154
"any-exchange",
@@ -158,7 +158,7 @@ protected void releaseResources() throws IOException {
158158
);
159159
channel.waitForConfirms(30 * 60 * 1000);
160160
// then
161-
assertThat(metrics.getPublishUnroutedMessages(), is(1L));
161+
assertThat(metrics.getPublishUnroutedMessages().getCount(), is(1L));
162162
} finally {
163163
safeClose(connection);
164164
}
@@ -172,13 +172,13 @@ protected void releaseResources() throws IOException {
172172
connection = connectionFactory.newConnection();
173173
Channel channel = connection.createChannel();
174174
channel.confirmSelect();
175-
assertThat(metrics.getPublishAcknowledgedMessages(), is(0L));
175+
assertThat(metrics.getPublishAcknowledgedMessages().getCount(), is(0L));
176176
channel.basicConsume(QUEUE, false, new MultipleAckConsumer(channel, false));
177177
// when
178178
sendMessage(channel);
179179
channel.waitForConfirms(30 * 60 * 1000);
180180
// then
181-
assertThat(metrics.getPublishAcknowledgedMessages(), is(1L));
181+
assertThat(metrics.getPublishAcknowledgedMessages().getCount(), is(1L));
182182
} finally {
183183
safeClose(connection);
184184
}

0 commit comments

Comments
 (0)