You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "prathmesh12-coder (via GitHub)" <gi...@apache.org> on 2026/07/15 06:38:35 UTC

[PR] HDDS-15709. Use uniqueObjectName for object names in integration tests to avoid intermittent BUCKET_ALREADY_EXISTS [ozone]

prathmesh12-coder opened a new pull request, #10773:
URL: https://github.com/apache/ozone/pull/10773

   ## What changes were proposed in this pull request?
   
   - we have intermittent `BUCKET_ALREADY_EXISTS` error during integration tests due to `RandomStringUtils.secure().nextNumeric(...)`
   
   - Replaced `RandomStringUtils.secure().nextNumeric(...)` with `OzoneTestBase.uniqueObjectName(...)` for Ozone object names (volume/bucket/key/snapshot) in integration tests.
   
   - Identity names (user/admin/owner), loop-indexed names, and `nextNumeric(32)` usages left unchanged.
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-15709
   
   ## How was this patch tested?
   
   CI success : https://github.com/prathmesh12-coder/ozone/actions/runs/29388650631 
   


-- 
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: issues-unsubscribe@ozone.apache.org

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


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


Re: [PR] HDDS-15709. Replace random name suffix with uniqueObjectName [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #10773:
URL: https://github.com/apache/ozone/pull/10773#issuecomment-4982113390

   Thanks @prathmesh12-coder for the patch, @sarvekshayr for the review.


-- 
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: issues-unsubscribe@ozone.apache.org

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


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


Re: [PR] HDDS-15709. Use uniqueObjectName for object names in integration tests to avoid intermittent BUCKET_ALREADY_EXISTS [ozone]

Posted by "prathmesh12-coder (via GitHub)" <gi...@apache.org>.
prathmesh12-coder commented on code in PR #10773:
URL: https://github.com/apache/ozone/pull/10773#discussion_r3586781985


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithAllRunning.java:
##########
@@ -251,8 +252,8 @@ public void testAllVolumeOperations() throws Exception {
 
   @Test
   public void testAllBucketOperations() throws Exception {
-    String volumeName = "volume" + RandomStringUtils.secure().nextNumeric(5);
-    String bucketName = "volume" + RandomStringUtils.secure().nextNumeric(5);
+    String volumeName = uniqueObjectName("volume");
+    String bucketName = uniqueObjectName("volume");

Review Comment:
   done..bucket prefix fixed in both files.



-- 
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: issues-unsubscribe@ozone.apache.org

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


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


Re: [PR] HDDS-15709. Replace random name suffix with uniqueObjectName [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #10773:
URL: https://github.com/apache/ozone/pull/10773


-- 
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: issues-unsubscribe@ozone.apache.org

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


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


Re: [PR] HDDS-15709. Use uniqueObjectName for object names in integration tests to avoid intermittent BUCKET_ALREADY_EXISTS [ozone]

Posted by "prathmesh12-coder (via GitHub)" <gi...@apache.org>.
prathmesh12-coder commented on code in PR #10773:
URL: https://github.com/apache/ozone/pull/10773#discussion_r3585492010


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithAllRunning.java:
##########
@@ -251,8 +252,8 @@ public void testAllVolumeOperations() throws Exception {
 
   @Test
   public void testAllBucketOperations() throws Exception {
-    String volumeName = "volume" + RandomStringUtils.secure().nextNumeric(5);
-    String bucketName = "volume" + RandomStringUtils.secure().nextNumeric(5);
+    String volumeName = uniqueObjectName("volume");
+    String bucketName = uniqueObjectName("volume");

Review Comment:
   Thanks @sarvekshayr for review !!
   I left this as it was before, will change the similar occurrences. volName -> "vol.." , bucName -> "buc.." etc.
   cc : @adoroszlai 



-- 
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: issues-unsubscribe@ozone.apache.org

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


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


Re: [PR] HDDS-15709. Use uniqueObjectName for object names in integration tests to avoid intermittent BUCKET_ALREADY_EXISTS [ozone]

Posted by "sarvekshayr (via GitHub)" <gi...@apache.org>.
sarvekshayr commented on code in PR #10773:
URL: https://github.com/apache/ozone/pull/10773#discussion_r3585320757


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithAllRunning.java:
##########
@@ -251,8 +252,8 @@ public void testAllVolumeOperations() throws Exception {
 
   @Test
   public void testAllBucketOperations() throws Exception {
-    String volumeName = "volume" + RandomStringUtils.secure().nextNumeric(5);
-    String bucketName = "volume" + RandomStringUtils.secure().nextNumeric(5);
+    String volumeName = uniqueObjectName("volume");
+    String bucketName = uniqueObjectName("volume");

Review Comment:
   Incorrect bucket prefix - 
   ```suggestion
       String bucketName = uniqueObjectName("bucket");
   ```



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAFollowerReadWithAllRunning.java:
##########
@@ -435,8 +436,8 @@ public void testAllVolumeOperations() throws Exception {
 
   @Test
   public void testAllBucketOperations() throws Exception {
-    String volumeName = "volume" + RandomStringUtils.secure().nextNumeric(5);
-    String bucketName = "volume" + RandomStringUtils.secure().nextNumeric(5);
+    String volumeName = uniqueObjectName("volume");
+    String bucketName = uniqueObjectName("volume");

Review Comment:
   Incorrect bucket prefix - 
   ```suggestion
       String bucketName = uniqueObjectName("bucket");
   ```



-- 
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: issues-unsubscribe@ozone.apache.org

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


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