rakeshadr commented on a change in pull request #2016:
URL: https://github.com/apache/ozone/pull/2016#discussion_r591193687



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneClientMultipartUploadV1.java
##########
@@ -566,6 +569,212 @@ public void testAbortUploadSuccessWithParts() throws 
Exception {
     // not making any assertion for the same.
   }
 
+  @Test
+  public void testListMultipartUploadParts() throws Exception {
+    String volumeName = UUID.randomUUID().toString();
+    String bucketName = UUID.randomUUID().toString();
+    String parentDir = "a/b/c/d/e/f";
+    String keyName = parentDir + UUID.randomUUID().toString();
+
+    store.createVolume(volumeName);
+    OzoneVolume volume = store.getVolume(volumeName);
+    volume.createBucket(bucketName);
+    OzoneBucket bucket = volume.getBucket(bucketName);
+
+    Map<Integer, String> partsMap = new TreeMap<>();
+    String uploadID = initiateMultipartUpload(bucket, keyName, STAND_ALONE,
+        ONE);
+    String partName1 = uploadPart(bucket, keyName, uploadID, 1,
+        generateData(OzoneConsts.OM_MULTIPART_MIN_SIZE, (byte)97));
+    partsMap.put(1, partName1);

Review comment:
       Thanks @linyiqun for the review comments.
   
   Yes, I'm doing partName assertion. Like we saw, it is storing `partName` in 
the `partsMap.put(1, partName1);` and down the line it is asserting partName 
against returned `ozoneMultipartUploadPartListParts`. Hope thats fine for you? 
Am I missing something?
   
       Assert.assertEquals(partsMap.get(ozoneMultipartUploadPartListParts
               .getPartInfoList().get(0).getPartNumber()),
           ozoneMultipartUploadPartListParts.getPartInfoList().get(0)
               .getPartName());
       Assert.assertEquals(partsMap.get(ozoneMultipartUploadPartListParts
               .getPartInfoList().get(1).getPartNumber()),
           ozoneMultipartUploadPartListParts.getPartInfoList().get(1)
               .getPartName());
       Assert.assertEquals(partsMap.get(ozoneMultipartUploadPartListParts
               .getPartInfoList().get(2).getPartNumber()),
           ozoneMultipartUploadPartListParts.getPartInfoList().get(2)
               .getPartName());
   
   




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to