ndimiduk commented on a change in pull request #1286: HBASE-23977 : Resolve
flakes present in TestSlowLogRecorder
URL: https://github.com/apache/hbase/pull/1286#discussion_r393391150
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/slowlog/TestSlowLogRecorder.java
##########
@@ -140,12 +141,16 @@ public void testOnlieSlowLogConsumption() throws
Exception {
Assert.assertNotEquals(-1, HBASE_TESTING_UTILITY.waitFor(3000,
() -> slowLogRecorder.getSlowLogPayloads(request).size() == 7));
- slowLogPayloads = slowLogRecorder.getSlowLogPayloads(request);
-
- Assert.assertEquals(slowLogPayloads.size(), 7);
- confirmPayloadParams(0, 7, slowLogPayloads);
- confirmPayloadParams(5, 2, slowLogPayloads);
- confirmPayloadParams(6, 1, slowLogPayloads);
+ Assert.assertNotEquals(-1, HBASE_TESTING_UTILITY.waitFor(3000,
+ () -> {
+ List<SlowLogPayload> slowLogPayloadsList =
slowLogRecorder.getSlowLogPayloads(request);
+ Assert.assertEquals(slowLogPayloadsList.size(), 7);
+ boolean b1 = confirmPayloadParams(0, 7, slowLogPayloadsList);
Review comment:
I don't understand why these tests are executed within the timeout window.
How does that make the tests more reliable?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services