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



##########
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:
       Ah interesting.. 
   
   If I run 
   ```
       bucket.createDirectory("/dir1");
       bucket.createDirectory("/dir1");
   ```
   The test will still pass without a complain. I expect an exception should be 
thrown. 
   
   I will check the internal of OM to see how does CreateDirectory API work, 
and see if there is anything can be improved.




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to