Shilun Fan created RATIS-2726:
---------------------------------

             Summary: testFollowerHeartbeatMetric may fail after a leader steps 
down
                 Key: RATIS-2726
                 URL: https://issues.apache.org/jira/browse/RATIS-2726
             Project: Ratis
          Issue Type: Bug
          Components: test
            Reporter: Shilun Fan
            Assignee: Shilun Fan


{{testFollowerHeartbeatMetric assumes that a follower's metric registry 
contains no lastHeartbeatElapsedTime gauges.}}

{{}}

{{However, a follower may have previously been the leader. }}

{{When it steps down, its registry is unregistered from 
MetricRegistries.global(), but the registry object still retains its gauges.}}

{{}}

{{ }}

{{The test reads this object directly and may fail:}}

{{}}
{code:java}
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
    at 
org.apache.ratis.LogAppenderTests.testFollowerHeartbeatMetric(LogAppenderTests.java:167)
 {code}
{{}}

{{}}

{{In the failing CI run, s2 became leader, then stepped down, and s1 became the 
new leader.}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to