The tests produces large records using producer performance tool and then starts another validating produce/consume loop for integer records. Consumer starts consuming from the latest offset to avoid consuming the large records produced earlier by the first producer. If the second producer starts producing records before the consumer has reset its offset to latest offset, then the consumer misses some records produced and the test fails:
AssertionError: 762 acked message did not make it to the Consumer. They are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19...plus 742 more. Total Acked: 174330, Total Consumed: 173568. We validated that the first 762 of these missing messages correctly made it into Kafka's data files. This suggests they were lost on their way to the consumer.