@@ -148,7 +148,7 @@ protected void releaseResources() throws IOException {
148
148
connection = connectionFactory .newConnection ();
149
149
Channel channel = connection .createChannel ();
150
150
channel .confirmSelect ();
151
- assertThat (metrics .getPublishUnroutedMessages (), is (1L ));
151
+ assertThat (metrics .getPublishUnroutedMessages (). getCount () , is (1L ));
152
152
// when
153
153
channel .basicPublish (
154
154
"any-exchange" ,
@@ -158,7 +158,7 @@ protected void releaseResources() throws IOException {
158
158
);
159
159
channel .waitForConfirms (30 * 60 * 1000 );
160
160
// then
161
- assertThat (metrics .getPublishUnroutedMessages (), is (1L ));
161
+ assertThat (metrics .getPublishUnroutedMessages (). getCount () , is (1L ));
162
162
} finally {
163
163
safeClose (connection );
164
164
}
@@ -172,13 +172,13 @@ protected void releaseResources() throws IOException {
172
172
connection = connectionFactory .newConnection ();
173
173
Channel channel = connection .createChannel ();
174
174
channel .confirmSelect ();
175
- assertThat (metrics .getPublishAcknowledgedMessages (), is (0L ));
175
+ assertThat (metrics .getPublishAcknowledgedMessages (). getCount () , is (0L ));
176
176
channel .basicConsume (QUEUE , false , new MultipleAckConsumer (channel , false ));
177
177
// when
178
178
sendMessage (channel );
179
179
channel .waitForConfirms (30 * 60 * 1000 );
180
180
// then
181
- assertThat (metrics .getPublishAcknowledgedMessages (), is (1L ));
181
+ assertThat (metrics .getPublishAcknowledgedMessages (). getCount () , is (1L ));
182
182
} finally {
183
183
safeClose (connection );
184
184
}
0 commit comments