rabbitmq-tests/src/test/java/com/datastax/oss/starlight/rabbitmqtests/javaclient/functional/FrameMax.java
@Test
  public void frameSizes() throws IOException, InterruptedException, TimeoutException {
    String queueName = channel.queueDeclare().getQueue();
    /* This should result in at least 3 frames. */
    int howMuch = 2 * FRAME_MAX;

    basicPublishVolatile(new byte[howMuch], queueName);

    /* Receive everything that was sent out. */
    while (howMuch > 0) {
      try {
        GetResponse response = TestUtils.basicGet(channel, queueName, false);
        howMuch -= response.getBody().length;
      } catch (Exception e) {
        e.printStackTrace();
        fail("Exception in basicGet loop: " + e);
      }
    }
  }
/* Publish a message of size FRAME_MAX.  The broker should split
   * this into two frames before sending back.  Frame content should
   * be less or equal to frame-max - 8. */
Publish a message of size FRAME_MAX.  The broker should split
this into two frames before sending back.  Frame content should
be less or equal to frame-max - 8.
Publish a message of size FRAME_MAX . The broker should split this into two frames before sending back . Frame content should be less or equal to frame - max - 8 .
@Test
  public void frameSizes() throws IOException, InterruptedException, TimeoutException {
    String queueName = channel.queueDeclare().getQueue();
    /* This should result in at least 3 frames. */
    int howMuch = 2 * FRAME_MAX;
    basicPublishVolatile(new byte[howMuch], queueName);
    /* Receive everything that was sent out. */
    while (howMuch > 0) {
      try {
        GetResponse response = TestUtils.basicGet(channel, queueName, false);
        howMuch -= response.getBody().length;
      } catch (Exception e) {
        e.printStackTrace();
        fail("Exception in basicGet loop: " + e);
      }
    }
  }
@ Test public void frameSizes ( ) throws IOException , InterruptedException , TimeoutException { String queueName = channel . queueDeclare ( ) . getQueue ( ) ; /* This should result in at least 3 frames. */ int howMuch = 2 * FRAME_MAX ; basicPublishVolatile ( new byte [ howMuch ] , queueName ) ; /* Receive everything that was sent out. */ while ( howMuch > 0 ) { try { GetResponse response = TestUtils . basicGet ( channel , queueName , false ) ; howMuch -= response . getBody ( ) . length ; } catch ( Exception e ) { e . printStackTrace ( ) ; fail ( "Exception in basicGet loop: " + e ) ; } } }
Publish a message of size FRAME_MAX.
Publish a message of size FRAME_MAX .