EdColeman commented on code in PR #3508:
URL: https://github.com/apache/accumulo/pull/3508#discussion_r1238712602


##########
test/src/main/java/org/apache/accumulo/test/functional/MemoryStarvedScanIT.java:
##########
@@ -392,21 +489,28 @@ public void testBatchScanPauses() throws Exception {
         assertEquals(currentCount, fetched.get());
         assertTrue(SCAN_START_DELAYED.doubleValue() >= paused);
         assertEquals(returned, SCAN_RETURNED_EARLY.doubleValue());
-        assertEquals(1, LOW_MEM_DETECTED.get());
 
+        // check across multiple low memory checks and metric updates that low 
memory detected
+        // remains set
+        int checkCount = 6;
+        while (checkCount-- > 0) {

Review Comment:
   There is no requirement for number of iterations. The more iterations the 
greater the confidence that the value is not flapping. So, there was a 
trade-off of greater confidence vs increased test time. 
   
   At a minimum, for the test to be valid the metrics do need to update at 
least once.
   
   Changed it to count up in 3ed08fc601, mainly for logging. Chose not to use 
IntStream here because it seems harder to understand for a common loop 
construct in a test,



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to