adoroszlai commented on a change in pull request #2727:
URL: https://github.com/apache/ozone/pull/2727#discussion_r731740012
##########
File path:
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/TestUtils.java
##########
@@ -629,6 +630,20 @@ public static ContainerInfo getContainer(
new RatisReplicationConfig(ReplicationFactor.THREE))
.setState(state)
.setSequenceId(10000L)
+ .setPipelineID(randomPipelineID)
+ .setOwner("TEST")
+ .build();
+ }
+
+ public static ContainerInfo getContainer(
+ final HddsProtos.LifeCycleState state, PipelineID pipelineID) {
+ return new ContainerInfo.Builder()
+ .setContainerID(RandomUtils.nextLong())
+ .setReplicationConfig(
+ new RatisReplicationConfig(ReplicationFactor.THREE))
+ .setState(state)
+ .setSequenceId(10000L)
+ .setPipelineID(pipelineID)
.setOwner("TEST")
.build();
Review comment:
Can we please avoid code duplication here? Most of this method and the
other `getContainer` method are the same.
--
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]