Skip to content

Commit 9efa274

Browse files
committed
simplify UnexpectedFrames test and note brittlness
1 parent 315cd7b commit 9efa274

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ private void expectUnexpectedFrameError(Confuser confuser) throws IOException {
8181
handler.confuser = confuser;
8282

8383
try {
84-
String queue = channel.queueDeclare().getQueue();
85-
channel.basicPublish("", queue, null, "Hello".getBytes());
86-
GetResponse result = channel.basicGet(queue, false);
87-
channel.basicAck(result.getEnvelope().getDeliveryTag(), false);
84+
//NB: the frame confuser relies on the encoding of the
85+
//method field to be at least 8 bytes long
86+
channel.basicPublish("", "routing key", null, "Hello".getBytes());
87+
channel.basicQos(0);
8888
fail("We should have seen an UNEXPECTED_FRAME by now");
8989
}
9090
catch (IOException e) {

0 commit comments

Comments
 (0)