virajjasani commented on a change in pull request #1286: HBASE-23977 : Resolve 
flakes present in TestSlowLogRecorder
URL: https://github.com/apache/hbase/pull/1286#discussion_r393459603
 
 

 ##########
 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:
   Since we are dealing with parallel processing and we are expecting consumer 
of ring buffer to get done with ordered events, but based on env, consumer 
might not be done by the time we expect ordered events present and hence we 
want to introduce time lag until we get that specific end result of expected 
ordered list of events in ring buffer. Sounds good @ndimiduk  ?

----------------------------------------------------------------
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

Reply via email to