avijayanhwx commented on a change in pull request #2506:
URL: https://github.com/apache/ozone/pull/2506#discussion_r684429888



##########
File path: 
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/ha/TestSCMHAConfiguration.java
##########
@@ -60,26 +60,17 @@ public void setup() {
 
   @Test
   public void testSetStorageDir() {
-    SCMHAConfiguration scmhaConfiguration = conf.getObject(
-        SCMHAConfiguration.class);
-    scmhaConfiguration.setRatisStorageDir("scm-ratis");
-    conf.setFromObject(scmhaConfiguration);
-
-    scmhaConfiguration = conf.getObject(
-        SCMHAConfiguration.class);
-    Assert.assertEquals("scm-ratis", scmhaConfiguration.getRatisStorageDir());
+    conf.set(ScmConfigKeys.RATIS_STORAGE_DIR, "scm-ratis");
+    Assert.assertEquals("scm-ratis", 
conf.get(ScmConfigKeys.RATIS_STORAGE_DIR));

Review comment:
       This test seems unnecessary now, since we removed the  
_SCMHAConfiguration_ class.

##########
File path: 
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/ha/TestSCMHAConfiguration.java
##########
@@ -60,26 +60,17 @@ public void setup() {
 
   @Test
   public void testSetStorageDir() {
-    SCMHAConfiguration scmhaConfiguration = conf.getObject(
-        SCMHAConfiguration.class);
-    scmhaConfiguration.setRatisStorageDir("scm-ratis");
-    conf.setFromObject(scmhaConfiguration);
-
-    scmhaConfiguration = conf.getObject(
-        SCMHAConfiguration.class);
-    Assert.assertEquals("scm-ratis", scmhaConfiguration.getRatisStorageDir());
+    conf.set(ScmConfigKeys.RATIS_STORAGE_DIR, "scm-ratis");
+    Assert.assertEquals("scm-ratis", 
conf.get(ScmConfigKeys.RATIS_STORAGE_DIR));
   }
 
   @Test
   public void testRaftLogPurgeEnabled() {
-    SCMHAConfiguration scmhaConfiguration = conf.getObject(
-        SCMHAConfiguration.class);
-    scmhaConfiguration.setRaftLogPurgeEnabled(true);
-    conf.setFromObject(scmhaConfiguration);
-
-    scmhaConfiguration = conf.getObject(
-        SCMHAConfiguration.class);
-    Assert.assertEquals(true, scmhaConfiguration.getRaftLogPurgeEnabled());
+    conf.setBoolean(ScmConfigKeys.RAFT_LOG_PURGE_ENABLED, true);
+
+    Assert.assertEquals(true, conf.getBoolean(

Review comment:
       Same as above.




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