anuragp010 commented on code in PR #11926:
URL: https://github.com/apache/ozone/pull/11926#discussion_r4484532232


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/replication/TestReplicationManager.java:
##########
@@ -1219,26 +1221,46 @@ public void testSendDatanodeReconstructCommand() throws 
NotLeaderException {
    * target has the correct deadline and that ContainerReplicaOp for
    * replica ADD is created correctly.
    */
-  @Test
-  public void testReplicateContainerCommandToTarget()
-      throws NotLeaderException {
-    // create a closed EC container
-    ECReplicationConfig ecRepConfig = new ECReplicationConfig(3, 2);
+  @ParameterizedTest
+  @CsvSource({
+      "0, SSD, ARCHIVE, ARCHIVE",
+      "1, SSD, ARCHIVE, ARCHIVE",
+      "0, ARCHIVE, SSD, SSD",
+      "1, ARCHIVE, SSD, SSD",
+      "0, SSD, DISK, DISK",
+      "1, SSD, DISK, DISK",
+      "0, SSD, , SSD",
+      "1, SSD, , SSD",
+      "0, , ARCHIVE, ARCHIVE",
+      "1, , ARCHIVE, ARCHIVE",
+      "0, EMPTY, SSD, SSD",
+      "1, EMPTY, SSD, SSD",
+      "0, , , ",
+      "1, , , ",
+      "0, EMPTY, , ",
+      "1, EMPTY, , "
+  })
+  public void testReplicateContainerCommandToTarget(int replicaIndex, 
StorageTier storageTier,
+      StorageType commandStorageType, StorageType expectedStorageType) throws 
NotLeaderException {

Review Comment:
   Thanks for pointing this out @devmadhuu . I missed this scenario. Yes, in 
that case we need to have both `commandStorageType` and `storageTier`.



-- 
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]

Reply via email to