Browse Source

Reinstate testUnhealthyLeaderIsReplaced (#95419)

David Turner 2 years ago
parent
commit
db37fe1d21

+ 0 - 6
server/src/test/java/org/elasticsearch/cluster/coordination/AtomicRegisterCoordinatorTests.java

@@ -59,12 +59,6 @@ public class AtomicRegisterCoordinatorTests extends CoordinatorTests {
         );
     }
 
-    @Override
-    @AwaitsFix(bugUrl = "ES-5645")
-    public void testUnhealthyLeaderIsReplaced() {
-        // In this test the leader still has access to the register, therefore it is still considered as a leader.
-    }
-
     @Override
     @TestLogging(
         reason = "testing ClusterFormationFailureHelper logging",

+ 1 - 0
test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java

@@ -1089,6 +1089,7 @@ public class AbstractCoordinatorTestCase extends ESTestCase {
                     persistedState,
                     () -> disconnectedNodes.contains(localNode.getId())
                         || blackholedNodes.contains(localNode.getId())
+                        || nodeHealthService.getHealth().getStatus() != HEALTHY
                         || (disruptStorage && rarely())
                 );
                 coordinator = new Coordinator(