Description
In the IllegalStateException, the code assert that the allLeaks set was non-empty. However, when it printed the message, the allLeaks set became 0 size. See https://github.com/apache/ratis/actions/runs/11047422561/job/30704978190?pr=1154#step:5:1100
Suppressed: java.lang.IllegalStateException: allLeaks.size = 0 at org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:77) at org.apache.ratis.util.LeakDetector.assertNoLeaks(LeakDetector.java:107) at org.apache.ratis.server.impl.MiniRaftCluster.shutdown(MiniRaftCluster.java:869) at org.apache.ratis.grpc.MiniRaftClusterWithGrpc.shutdown(MiniRaftClusterWithGrpc.java:96) at org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:149) at org.apache.ratis.server.impl.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:121) at org.apache.ratis.InstallSnapshotFromLeaderTests.testInstallSnapshotLeaderSwitch(InstallSnapshotFromLeaderTests.java:96) at org.apache.ratis.grpc.TestLeaderInstallSnapshotWithGrpc.testInstallSnapshotLeaderSwitch(TestLeaderInstallSnapshotWithGrpc.java:53) at java.lang.reflect.Method.invoke(Method.java:498) ... 44 more