You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "arunsarin85 (via GitHub)" <gi...@apache.org> on 2026/06/10 10:23:12 UTC

[PR] HDDS-15200. Refactor TestReconOmMetaManagerUtils to ReconOmMetaManagerTestUtils [ozone]

arunsarin85 opened a new pull request, #10480:
URL: https://github.com/apache/ozone/pull/10480

   ## What changes were proposed in this pull request?
   
   - Refactor TestReconOmMetaManagerUtils to ReconOmMetaManagerTestUtils
   
   Please describe your PR in detail:
   
   - Rename TestReconOmMetaManagerUtils to ReconOmMetaManagerTestUtils
   - Make waitForEventBufferEmpty a static method
   - Make the utility class final with a private constructor
   - Remove instance fields from TestReconContainerEndpoint and TestReconWithOzoneManagerHA
   
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-15200
   
   ## How was this patch tested?
   
   - Ran:
   
   ```
   mvn -pl hadoop-ozone/integration-test-recon -am \
     -Dtest=TestReconContainerEndpoint,TestReconWithOzoneManagerHA \
     -DfailIfNoTests=false test
   
   ```
   - Build passed successfully


-- 
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-15200. Refactor TestReconOmMetaManagerUtils to ReconOmMetaManagerTestUtils [ozone]

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


-- 
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-15200. Refactor TestReconOmMetaManagerUtils to ReconOmMetaManagerTestUtils [ozone]

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


##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconContainerEndpoint.java:
##########
@@ -121,7 +120,7 @@ public void testContainerEndpointForFSOLayout() throws Exception {
     ReconTaskControllerImpl reconTaskController =
         (ReconTaskControllerImpl) recon.getReconServer().getReconTaskController();
     CompletableFuture<Void> completableFuture =
-        omMetaManagerUtils.waitForEventBufferEmpty(reconTaskController.getEventBuffer());
+        ReconOmMetaManagerTestUtils.waitForEventBufferEmpty(reconTaskController.getEventBuffer());

Review Comment:
   Addressed



##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconWithOzoneManagerHA.java:
##########
@@ -144,15 +143,15 @@ public void testReconGetsSnapshotFromLeader() throws Exception {
     ReconTaskControllerImpl reconTaskController =
         (ReconTaskControllerImpl) recon.getReconServer().getReconTaskController();
     CompletableFuture<Void> completableFuture =
-        omMetaManagerUtils.waitForEventBufferEmpty(reconTaskController.getEventBuffer());
+        ReconOmMetaManagerTestUtils.waitForEventBufferEmpty(reconTaskController.getEventBuffer());

Review Comment:
   Addressed



-- 
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-15200. Refactor TestReconOmMetaManagerUtils to ReconOmMetaManagerTestUtils [ozone]

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


##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/ReconOmMetaManagerTestUtils.java:
##########
@@ -25,9 +25,12 @@
 import org.apache.ozone.test.GenericTestUtils;
 
 /**
- * Test Recon Utility methods.
+ * Utility methods for Recon OM metadata manager integration tests.
  */
-public class TestReconOmMetaManagerUtils {
+public final class ReconOmMetaManagerTestUtils {

Review Comment:
   ```suggestion
   final class ReconOmMetaManagerTestUtils {
   ```



##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconWithOzoneManagerHA.java:
##########
@@ -144,15 +143,15 @@ public void testReconGetsSnapshotFromLeader() throws Exception {
     ReconTaskControllerImpl reconTaskController =
         (ReconTaskControllerImpl) recon.getReconServer().getReconTaskController();
     CompletableFuture<Void> completableFuture =
-        omMetaManagerUtils.waitForEventBufferEmpty(reconTaskController.getEventBuffer());
+        ReconOmMetaManagerTestUtils.waitForEventBufferEmpty(reconTaskController.getEventBuffer());

Review Comment:
   Same here, I'd prefer adding `import static`.



##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconContainerEndpoint.java:
##########
@@ -121,7 +120,7 @@ public void testContainerEndpointForFSOLayout() throws Exception {
     ReconTaskControllerImpl reconTaskController =
         (ReconTaskControllerImpl) recon.getReconServer().getReconTaskController();
     CompletableFuture<Void> completableFuture =
-        omMetaManagerUtils.waitForEventBufferEmpty(reconTaskController.getEventBuffer());
+        ReconOmMetaManagerTestUtils.waitForEventBufferEmpty(reconTaskController.getEventBuffer());

Review Comment:
   Let's add `import static` for the two methods (`waitForEventBufferEmpty` and `waitUntilReconKeyCounts`) to improve readability.



##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/ReconOmMetaManagerTestUtils.java:
##########
@@ -36,7 +39,8 @@ public class TestReconOmMetaManagerUtils {
    *
    * @return CompletableFuture that completes when buffer is empty
    */
-  public CompletableFuture<Void> waitForEventBufferEmpty(OMUpdateEventBuffer eventBuffer) {
+  public static CompletableFuture<Void> waitForEventBufferEmpty(
+      OMUpdateEventBuffer eventBuffer) {

Review Comment:
   ```suggestion
     static CompletableFuture<Void> waitForEventBufferEmpty(OMUpdateEventBuffer eventBuffer) {
   ```



-- 
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-15200. Refactor TestReconOmMetaManagerUtils to ReconOmMetaManagerTestUtils [ozone]

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


##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/ReconOmMetaManagerTestUtils.java:
##########
@@ -25,9 +25,12 @@
 import org.apache.ozone.test.GenericTestUtils;
 
 /**
- * Test Recon Utility methods.
+ * Utility methods for Recon OM metadata manager integration tests.
  */
-public class TestReconOmMetaManagerUtils {
+public final class ReconOmMetaManagerTestUtils {

Review Comment:
   Addressed



##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/ReconOmMetaManagerTestUtils.java:
##########
@@ -36,7 +39,8 @@ public class TestReconOmMetaManagerUtils {
    *
    * @return CompletableFuture that completes when buffer is empty
    */
-  public CompletableFuture<Void> waitForEventBufferEmpty(OMUpdateEventBuffer eventBuffer) {
+  public static CompletableFuture<Void> waitForEventBufferEmpty(
+      OMUpdateEventBuffer eventBuffer) {

Review Comment:
   Addressed



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