[ 
https://issues.apache.org/jira/browse/RATIS-884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lokesh Jain resolved RATIS-884.
-------------------------------
    Fix Version/s: 0.6.0
       Resolution: Fixed

> Failed UT: TestRaftLogMetrics.testRaftLogMetrics
> ------------------------------------------------
>
>                 Key: RATIS-884
>                 URL: https://issues.apache.org/jira/browse/RATIS-884
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: runzhiwang
>            Assignee: runzhiwang
>            Priority: Major
>             Fix For: 0.6.0
>
>         Attachments: screenshot-1.png, screenshot-2.png
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> *What's the problem ?*
>  !screenshot-1.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.
>  !screenshot-2.png! 
> *How to fix ?*
> Retry check expectedFlush == tm.getCount()



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to