Skip to content

Commit c6f5ae8

Browse files
author
Simon MacMullen
committed
expectError() actually does this right (catches AlreadyClosedException too) so use the right tool for the job.
1 parent e8f3737 commit c6f5ae8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,8 @@ public void testRejectExceedingFrameMax()
9393
ConnectionFactory cf = new GenerousConnectionFactory();
9494
connection = cf.newConnection();
9595
openChannel();
96-
try {
97-
basicPublishVolatile(new byte[connection.getFrameMax()], "void");
98-
channel.basicQos(0);
99-
fail("Expected exception when publishing");
100-
} catch (IOException e) {
101-
}
96+
basicPublishVolatile(new byte[connection.getFrameMax()], "void");
97+
expectError(AMQP.FRAME_ERROR);
10298
}
10399

104100
/* ConnectionFactory that uses MyFrameHandler rather than

0 commit comments

Comments
 (0)