tst/com/amazon/kinesis/streaming/agent/tailing/PublishingQueueTest.java [170:187]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        final int recordSize = flow.getMaxRecordSizeBytes() / recordCount / 2;
        final double recordSizeJitter = 0.0;
        RecordGenerator generator = new RecordGenerator(recordSize, recordSizeJitter);
        long totalBytes = 0;
        for(int i = 0; i < recordCount; ++i) {
            FirehoseRecord record = getTestRecord(flow, generator);
            Assert.assertTrue(q.offerRecord(record));
            totalBytes += record.lengthWithOverhead();
        }
        // SANITYCHECK: We shouldn't have any buffers yet, assuming this didn't
        //              take longer than max buffer age, and we didn't exceed
        //              the max buffer size in bytes
        Assert.assertTrue(timer.elapsed(TimeUnit.MILLISECONDS) < flow.getMaxBufferAgeMillis());
        Assert.assertTrue(totalBytes < flow.getMaxBufferSizeBytes());

        Assert.assertEquals(q.size(), 0);
        Assert.assertEquals(q.pendingRecords(), recordCount);
        Assert.assertEquals(q.totalRecords(), recordCount);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tst/com/amazon/kinesis/streaming/agent/tailing/PublishingQueueTest.java [230:247]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        final int recordSize = flow.getMaxRecordSizeBytes() / recordCount / 2;
        final double recordSizeJitter = 0.0;
        RecordGenerator generator = new RecordGenerator(recordSize, recordSizeJitter);
        long totalBytes = 0;
        for(int i = 0; i < recordCount; ++i) {
            FirehoseRecord record = getTestRecord(flow, generator);
            Assert.assertTrue(q.offerRecord(record));
            totalBytes += record.lengthWithOverhead();
        }
        // SANITYCHECK: We shouldn't have any buffers yet, assuming this didn't
        //              take longer than max buffer age, and we didn't exceed
        //              the max buffer size in bytes
        Assert.assertTrue(timer.elapsed(TimeUnit.MILLISECONDS) < flow.getMaxBufferAgeMillis());
        Assert.assertTrue(totalBytes < flow.getMaxBufferSizeBytes());

        Assert.assertEquals(q.size(), 0);
        Assert.assertEquals(q.pendingRecords(), recordCount);
        Assert.assertEquals(q.totalRecords(), recordCount);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



