[ https://issues.apache.org/jira/browse/RATIS-848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
runzhiwang updated RATIS-848: ----------------------------- Description: *Why unit test TestRaftSnapshotWithGrpc.testBasicInstallSnapshot failed?* In the test, leader take snapshot, then add two followers, then [leader restart|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/test/java/org/apache/ratis/statemachine/RaftSnapshotBaseTest.java#L236], then verifyTakeSnapshotMetric. It must be failed when verifyTakeSnapshotMetric after restarting leader. Because restart leader will create a new instance of RaftServer, the metric of take snapshot is clean. *How to fix ?* verifyTakeSnapshotMetric after leader take snapshot. was: *Why unit test TestRaftSnapshotWithGrpc.testBasicInstallSnapshot failed?* In the test, leader take snapshot, then add two followers, then [leader restart|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/test/java/org/apache/ratis/statemachine/RaftSnapshotBaseTest.java#L236], then verifyTakeSnapshotMetric. It must be failed when verifyTakeSnapshotMetric after restarting leader. Because restart leader will create a new instance of RaftServer, the metric of take snapshot is clean. How to fix ? verifyTakeSnapshotMetric after leader take snapshot. > Failed UT: TestRaftSnapshotWithGrpc.testBasicInstallSnapshot > ------------------------------------------------------------ > > Key: RATIS-848 > URL: https://issues.apache.org/jira/browse/RATIS-848 > Project: Ratis > Issue Type: Bug > Reporter: runzhiwang > Assignee: runzhiwang > Priority: Major > Attachments: RATIS-848.001.patch > > > *Why unit test TestRaftSnapshotWithGrpc.testBasicInstallSnapshot failed?* > In the test, leader take snapshot, then add two followers, then [leader > restart|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/test/java/org/apache/ratis/statemachine/RaftSnapshotBaseTest.java#L236], > then verifyTakeSnapshotMetric. > It must be failed when verifyTakeSnapshotMetric after restarting leader. > Because restart leader will create a new instance of RaftServer, the metric > of take snapshot is clean. > *How to fix ?* > verifyTakeSnapshotMetric after leader take snapshot. -- This message was sent by Atlassian Jira (v8.3.4#803005)