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 {
140140 }
141141 }
142142
143- @ Test public void metricsPublisherUnrouted () throws IOException , TimeoutException , InterruptedException {
143+ @ Test public void metricsPublisherUnrouted () throws IOException , TimeoutException {
144144 StandardMetricsCollector metrics = new StandardMetricsCollector ();
145145 connectionFactory .setMetricsCollector (metrics );
146146 Connection connection = null ;
147147 try {
148148 connection = connectionFactory .newConnection ();
149149 Channel channel = connection .createChannel ();
150150 channel .confirmSelect ();
151- assertThat (metrics .getPublishUnroutedMessages ().getCount (), is (1L ));
151+ assertThat (metrics .getPublishUnroutedMessages ().getCount (), is (0L ));
152152 // when
153- channel .exchangeDeclare ("any-exchange" , "direct" );
154153 channel .basicPublish (
155- "any-exchange " ,
156- "any-routing-key" ,
154+ "amq.direct " ,
155+ "any-unroutable- routing-key" ,
157156 /* basic.return will be sent back only if the message is mandatory */ true ,
158157 MessageProperties .MINIMAL_BASIC ,
159158 "any-message" .getBytes ()
You can’t perform that action at this time.
0 commit comments