adoroszlai commented on code in PR #5726:
URL: https://github.com/apache/ozone/pull/5726#discussion_r1423724346
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/TestSCMContainerPlacementRackAware.java:
##########
@@ -563,6 +574,69 @@ public void
testvalidateContainerPlacementSingleRackCluster() {
assertEquals(0, stat.misReplicationCount());
}
+ @ParameterizedTest
+ @MethodSource("decommissionNodeStates")
Review Comment:
Nit: can use existing method from `NodeStatus`:
https://github.com/apache/ozone/blob/698e2f4ffc2fd60a6164ffd541e7400d4fa2a727/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeStatus.java#L60-L62
as already used in:
https://github.com/apache/ozone/blob/698e2f4ffc2fd60a6164ffd541e7400d4fa2a727/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/replication/TestRatisContainerReplicaCount.java#L212-L214
(`MethodSource` allows any collection (does not have to use `Stream`), and
for single parameter we can use the type directly, no need to wrap i
n`Arguments`.)
```suggestion
@MethodSource("org.apache.hadoop.hdds.scm.node.NodeStatus#decommissionStates")
```
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/TestSCMContainerPlacementRackScatter.java:
##########
@@ -569,6 +579,67 @@ public void testValidateContainerPlacement(int
datanodeCount) {
assertEquals(0, stat.misReplicationCount());
}
+ @ParameterizedTest
+ @MethodSource("decommissionNodeStates")
Review Comment:
```suggestion
@MethodSource("org.apache.hadoop.hdds.scm.node.NodeStatus#decommissionStates")
```
--
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]