Skip to content

Commit d859205

Browse files
committed
#354 | Message has to be mandatory for basic.return to be sent back
1 parent c45ad73 commit d859205

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ protected void releaseResources() throws IOException {
154154
channel.basicPublish(
155155
"any-exchange",
156156
"any-routing-key",
157+
/* basic.return will be sent back only if the message is mandatory */ true,
157158
MessageProperties.MINIMAL_BASIC,
158159
"any-message".getBytes()
159160
);
@@ -162,7 +163,6 @@ protected void releaseResources() throws IOException {
162163
() -> metrics.getPublishUnroutedMessages().getCount(),
163164
equalTo(1L)
164165
);
165-
assertThat(metrics.getPublishUnroutedMessages().getCount(), is(1L));
166166
} finally {
167167
safeClose(connection);
168168
}

0 commit comments

Comments
 (0)