umamaheswararao commented on a change in pull request #2430:
URL: https://github.com/apache/ozone/pull/2430#discussion_r676353411



##########
File path: 
hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/client/TestReplicationConfig.java
##########
@@ -27,6 +29,23 @@
  */
 public class TestReplicationConfig {
 
+  @Test
+  public void testGetDefaultShouldCreateReplicationConfigFromConf() {
+    OzoneConfiguration conf = new OzoneConfiguration();
+    ReplicationConfig replicationConfig = ReplicationConfig.getDefault(conf);
+    Assert.assertEquals(
+        org.apache.hadoop.hdds.client.ReplicationType.RATIS.name(),
+        replicationConfig.getReplicationType().name());
+    Assert.assertEquals(3, replicationConfig.getRequiredNodes());
+    conf.set(OzoneConfigKeys.OZONE_REPLICATION_TYPE, "STAND_ALONE");
+    conf.set(OzoneConfigKeys.OZONE_REPLICATION, "1");
+    replicationConfig = ReplicationConfig.getDefault(conf);
+    Assert.assertEquals(
+        org.apache.hadoop.hdds.client.ReplicationType.STAND_ALONE.name(),
+        replicationConfig.getReplicationType().name());
+    Assert.assertEquals(1, replicationConfig.getRequiredNodes());

Review comment:
       Sure, I have separated the tests into two.




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