Description
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 15.554 sec <<< FAILURE! testTonsOfSpans(org.apache.avro.ipc.trace.TestFileSpanStorage) Time elapsed: 3.853 sec <<< FAILURE! java.lang.AssertionError: expected:<50000> but was:<42356> at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.failNotEquals(Assert.java:647) at org.junit.Assert.assertEquals(Assert.java:128) at org.junit.Assert.assertEquals(Assert.java:472) at org.junit.Assert.assertEquals(Assert.java:456) at org.apache.avro.ipc.trace.TestFileSpanStorage.testTonsOfSpans(TestFileSpanStorage.java:70)
The issue seems to be the Thread.sleep(2000) on line 66. Doubling this to 4000ms causes the test to pass. In general it might be better to make this sleep event-based rather than using a fixed sleep time. If that isn't possible, then maybe using some sort of a retry loop would work.