diff --git a/ratis-server/src/test/java/org/apache/ratis/server/impl/LeaderElectionTests.java b/ratis-server/src/test/java/org/apache/ratis/server/impl/LeaderElectionTests.java index 2fddbe2266..6a5c6387cc 100644 --- a/ratis-server/src/test/java/org/apache/ratis/server/impl/LeaderElectionTests.java +++ b/ratis-server/src/test/java/org/apache/ratis/server/impl/LeaderElectionTests.java @@ -171,6 +171,7 @@ public void testAddServerForWaitReady() throws IOException, InterruptedException } } cluster.shutdown();; + CodeInjectionForTesting.remove(RaftServerImpl.START_COMPLETE); } @Test diff --git a/ratis-server/src/test/java/org/apache/ratis/server/impl/MiniRaftCluster.java b/ratis-server/src/test/java/org/apache/ratis/server/impl/MiniRaftCluster.java index e3f724e244..83ea79536c 100644 --- a/ratis-server/src/test/java/org/apache/ratis/server/impl/MiniRaftCluster.java +++ b/ratis-server/src/test/java/org/apache/ratis/server/impl/MiniRaftCluster.java @@ -344,7 +344,6 @@ public void start() throws IOException { LOG.info("... Starting " + JavaUtils.getClassSimpleName(getClass())); LOG.info("... "); LOG.info(".............................................................. "); - initServers(); startServers(servers.values()); this.timer.updateAndGet(t -> t != null? t