Skip to content

Commit 4d56bb7

Browse files
committed
merge heads
2 parents 6876e44 + 04bb436 commit 4d56bb7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ private interface Confuser {
1717
public Frame confuse(Frame frame) throws IOException;
1818
}
1919

20+
@Override protected void setUp() throws IOException {}
21+
22+
@Override protected void tearDown() throws IOException {}
23+
2024
public void testMissingHeader() throws IOException {
2125
expectUnexpectedFrameError(new Confuser() {
2226
public Frame confuse(Frame frame) {
@@ -81,10 +85,10 @@ private void expectUnexpectedFrameError(Confuser confuser) throws IOException {
8185
handler.confuser = confuser;
8286

8387
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);
88+
//NB: the frame confuser relies on the encoding of the
89+
//method field to be at least 8 bytes long
90+
channel.basicPublish("", "routing key", null, "Hello".getBytes());
91+
channel.basicQos(0);
8892
fail("We should have seen an UNEXPECTED_FRAME by now");
8993
}
9094
catch (IOException e) {

0 commit comments

Comments
 (0)