runzhiwang opened a new pull request #66:
URL: https://github.com/apache/incubator-ratis/pull/66


   **What's the problem ?**
   
![image](https://user-images.githubusercontent.com/51938049/80348528-807c5c00-88a0-11ea-9069-78f7f56b02f7.png)
   
   **What's the reason ?**
   As the images shows, flushCount.incrementAndGet() happens in the 1st 
statement: stateMachine.flushStateMachineData(lastWrittenIndex), 
ratisMetricRegistry.get(RAFT_LOG_FLUSH_TIME) increase after the 2nd statement: 
timerContext.stop(). If the test Assert.assertEquals(expectedFlush, 
tm.getCount()) happens between 1st and 2nd statement, then the expectedFlush 
will be tm.getCount() + 1, so the test fail.
   
   
![image](https://user-images.githubusercontent.com/51938049/80348569-8eca7800-88a0-11ea-8d19-f2965c94a584.png)
   
   **How to fix ?**
   Retry check expectedFlush == tm.getCount()


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


Reply via email to