You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/08/11 15:58:36 UTC

[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #1304: HDDS-1745. Add integration test for createDirectory for OM HA

bharatviswa504 commented on a change in pull request #1304:
URL: https://github.com/apache/hadoop-ozone/pull/1304#discussion_r468689720



##########
File path: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAMetadataOnly.java
##########
@@ -348,6 +362,57 @@ public void testJMXMetrics() throws Exception {
     Assert.assertTrue((long) flushCount >= 0);
   }
 
+  @Test
+  public void testOMCreateDirectory() throws Exception {
+    ObjectStore objectStore = getCluster().getRpcClient().getObjectStore();
+    String volumeName = "vol";
+    String bucketName = "buk";
+    String keyName = "test_dir";
+
+    objectStore.createVolume(volumeName);
+    objectStore.getVolume(volumeName).createBucket(bucketName);
+
+    OMRequest request = OMRequest.newBuilder().setCreateDirectoryRequest(

Review comment:
       We do not need this kind of tests, they are covered in UT.
   
   We can use `createDirectory `API and test create Directory functionality.
   
   Test cases can be: 
   1. single level path ('/dir)
   2. Multi-level ('/dir1/dir2')
   3. Few parents exist in multi-level path
   4. Already a directory exists with the same name
   
   any other cases you want to add :)
   
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org