The test `kafka.api.MetricsTest.testMetrics` has been failing intermittently in kafka builds (recent proof: https://github.com/apache/kafka/pull/5436#issuecomment-409683955)
The particular failure is in the `MessageConversionsTimeMs` metric assertion -
There has been work done previously (https://github.com/apache/kafka/pull/4681) to combat the flakiness of the test and while it has improved it, the test still fails sometimes.
On my machine, the test failed 5 times out of 25 runs. Increasing the record size and using compression should slow down message conversion enough to have it be above 1ms. Locally this test has not failed in 200 runs and counting with those changes