Skip to content

Commit e526c7d

Browse files
Make frame_max negotiation test more like channel_max
1 parent faf7c7d commit e526c7d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import com.rabbitmq.client.impl.FrameHandler;
3535
import com.rabbitmq.client.impl.LongStringHelper;
3636
import com.rabbitmq.client.impl.SocketFrameHandler;
37+
import com.rabbitmq.tools.Host;
3738

3839
public class FrameMax extends BrokerTestCase {
3940
/* This value for FrameMax is larger than the minimum and less
@@ -73,12 +74,15 @@ public void testFrameSizes()
7374
public void testRejectLargeFramesDuringConnectionNegotiation()
7475
throws IOException
7576
{
77+
Host.rabbitmqctl("eval 'application:set_env(rabbit, frame_max, 4096).'");
7678
ConnectionFactory cf = new ConnectionFactory();
7779
cf.getClientProperties().put("too_long", LongStringHelper.asLongString(new byte[AMQP.FRAME_MIN_SIZE]));
7880
try {
7981
cf.newConnection();
8082
fail("Expected exception during connection negotiation");
8183
} catch (IOException e) {
84+
} finally {
85+
Host.rabbitmqctl("eval 'application:set_env(rabbit, frame_max, 131768).'");
8286
}
8387
}
8488

0 commit comments

Comments
 (0)