sodonnel commented on code in PR #5562:
URL: https://github.com/apache/ozone/pull/5562#discussion_r1387899186
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/replication/TestLegacyReplicationManager.java:
##########
@@ -1582,6 +1583,43 @@ public void
testUnderReplicatedWithOnlyUnhealthyReplicas(int numReplicas)
assertUnderReplicatedCount(1);
}
+ @ParameterizedTest
+ @EnumSource(value = LifeCycleState.class,
+ names = {"CLOSED", "QUASI_CLOSED"})
+ public void testUnderReplicatedWithOnlyUnhealthyReplicasDecommission(
+ LifeCycleState state)
+ throws Exception {
+ final ContainerInfo container = createContainer(state);
+ for (int i = 0; i < 2; i++) {
+ addReplica(container, NodeStatus.inServiceHealthy(), UNHEALTHY);
+ }
+ addReplica(container, new NodeStatus(DECOMMISSIONING, HEALTHY),
+ UNHEALTHY);
+ assertReplicaScheduled(1);
+ assertUnderReplicatedCount(1);
+ // Run again, and there should be a pending add scheduled, so nothing
+ // else should get scheduled.
+ assertReplicaScheduled(0);
+ }
+
+ @ParameterizedTest
+ @EnumSource(value = LifeCycleState.class,
+ names = {"CLOSED", "QUASI_CLOSED"})
+ public void testOverReplicatedWithOnlyUnhealthyReplicas()
Review Comment:
Ah, I will fix that!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]