Github user joshelser commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/128#discussion_r71266660
  
    --- Diff: 
test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java ---
    @@ -232,4 +216,53 @@ private void writeSomeData(Connector conn, String 
tableName, int row, int col) t
         return result;
       }
     
    +  private final int TIMES_TO_COUNT = 20;
    +  private final int PAUSE_BETWEEN_COUNTS = 100;
    +
    +  private Map<String,Boolean> getWALsAndAssertCount(Connector c, int 
expectedCount) throws Exception {
    +    // see https://issues.apache.org/jira/browse/ACCUMULO-4110. Sometimes 
this test counts the logs before
    +    // the new standby log is actually ready. So let's try a few times 
before failing, returning the last
    +    // wals variable with the the correct count.
    +    Map<String,Boolean> wals = _getWals(c);
    +    if (wals.size() == expectedCount) {
    +      return wals;
    +    }
    +
    +    int waitLonger = getWaitFactor();
    +    for (int i = 1; i <= TIMES_TO_COUNT; i++) {
    +      Thread.sleep(i * PAUSE_BETWEEN_COUNTS * waitLonger);
    +      wals = _getWals(c);
    +      if (wals.size() == expectedCount) {
    +        return wals;
    +      }
    +    }
    +
    +    fail("Unable to get the correct number of WALs, expected " + 
expectedCount + " but got " + wals.toString());
    --- End diff --
    
    Ahh, sorry, this is my bad. I didn't realize you also removed all of the 
`assertEquals()` calls in the test case. I saw 
https://github.com/apache/accumulo/pull/128/files/4cee43691dc191236682db1894854337812419bb#diff-e901412aabad86d17df0a2dc524dcde9R157
 which confused me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to