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


   ## What changes were proposed in this pull request?
   
   Fix TestRaftSnapshotWithGrpc and TestRaftSnapshotWithSimulatedRpc: 
`StateMachineUpdater` [unregisters metric 
registry](https://github.com/apache/incubator-ratis/blob/56e2073515804cc70f64b215f971d547070ed38f/ratis-server/src/main/java/org/apache/ratis/server/impl/StateMachineUpdater.java#L129)
 during stop, so the timer after restart is not the same instance as before.  
Thus, to verify that snapshot is taken during stop, we need to obtain the 
pre-stop timer.
   
   Also verify the metric right after snapshot file is created.
   
   https://issues.apache.org/jira/browse/RATIS-889
   
   ## How was this patch tested?
   
   Executed `TestRaftSnapshot*` multiple times.  Also passed in CI:
   
   https://github.com/adoroszlai/incubator-ratis/runs/633049769


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