File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/test/java/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -140,20 +140,19 @@ protected void releaseResources() throws IOException {
140
140
}
141
141
}
142
142
143
- @ Test public void metricsPublisherUnrouted () throws IOException , TimeoutException , InterruptedException {
143
+ @ Test public void metricsPublisherUnrouted () throws IOException , TimeoutException {
144
144
StandardMetricsCollector metrics = new StandardMetricsCollector ();
145
145
connectionFactory .setMetricsCollector (metrics );
146
146
Connection connection = null ;
147
147
try {
148
148
connection = connectionFactory .newConnection ();
149
149
Channel channel = connection .createChannel ();
150
150
channel .confirmSelect ();
151
- assertThat (metrics .getPublishUnroutedMessages ().getCount (), is (1L ));
151
+ assertThat (metrics .getPublishUnroutedMessages ().getCount (), is (0L ));
152
152
// when
153
- channel .exchangeDeclare ("any-exchange" , "direct" );
154
153
channel .basicPublish (
155
- "any-exchange " ,
156
- "any-routing-key" ,
154
+ "amq.direct " ,
155
+ "any-unroutable- routing-key" ,
157
156
/* basic.return will be sent back only if the message is mandatory */ true ,
158
157
MessageProperties .MINIMAL_BASIC ,
159
158
"any-message" .getBytes ()
You can’t perform that action at this time.
0 commit comments