sodonnel commented on a change in pull request #2880:
URL: https://github.com/apache/ozone/pull/2880#discussion_r761796889



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java
##########
@@ -3753,4 +3757,65 @@ public void testOverWriteKeyWithAndWithOutVersioning() 
throws Exception {
     createRequiredForVersioningTest(volumeName, bucketName, keyName, true);
     checkExceptedResultForVersioningTest(volumeName, bucketName, keyName, 2);
   }
+
+  @Test
+  public void testSetECReplicationConfigOnBucket()
+      throws IOException {
+    String volumeName = UUID.randomUUID().toString();
+    store.createVolume(volumeName);
+    OzoneVolume volume = store.getVolume(volumeName);
+    OzoneBucket bucket = getBucket(volume);
+    Assert.assertEquals(bucket.getName(), bucket.getName());
+    ReplicationConfig currentReplicationConfig = bucket.getReplicationConfig();
+    Assert.assertEquals(
+        new StandaloneReplicationConfig(HddsProtos.ReplicationFactor.ONE),
+        currentReplicationConfig);
+    bucket.setReplicationConfig(
+        new ECReplicationConfig(3, 2, ECReplicationConfig.EcCodec.RS, 1024));
+
+    // Get the bucket and check the updated config.
+    bucket = volume.getBucket(bucket.getName());
+
+    Assert.assertEquals(
+        new ECReplicationConfig(3, 2, ECReplicationConfig.EcCodec.RS, 1024),
+        bucket.getReplicationConfig());
+
+    //Reset replication config back.
+    bucket.setReplicationConfig(currentReplicationConfig);
+  }
+
+  @Test
+  public void testSetRatisReplicationConfigOnBucket()

Review comment:
       Is it worth just merging this test into the one above? Eg set the config 
to EC, check it, then set it to Ratis and check it, and then restore to default 
and check it?




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