chungen0126 commented on code in PR #7691:
URL: https://github.com/apache/ozone/pull/7691#discussion_r1913921599


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMDbCheckpointServlet.java:
##########
@@ -244,16 +236,31 @@ private void setupCluster() throws Exception {
         anyBoolean());
   }
 
-  @ParameterizedTest
-  @MethodSource("getHttpMethods")
-  public void testEndpoint(String httpMethod) throws Exception {
-    this.method = httpMethod;
-
+  @Test
+  void testWithoutACL() throws Exception {
     conf.setBoolean(OZONE_ACL_ENABLED, false);
     conf.set(OZONE_ADMINISTRATORS, OZONE_ADMINISTRATORS_WILDCARD);
 
     setupCluster();
 
+    testBootstrapLocking();
+
+    testEndpoint("POST");
+    testEndpoint("GET");
+    testDoPostWithInvalidContentType();
+
+    prepSnapshotData();
+
+    testWriteDbDataWithoutOmSnapshot();
+    testWriteDbDataToStream();
+    testWriteDbDataWithToExcludeFileList();
+  }
+
+  private void testEndpoint(String httpMethod) throws Exception {
+    this.method = httpMethod;
+
+    setupMocks();
+
     final OzoneManager om = cluster.getOzoneManager();

Review Comment:
   I think we can add om as a class attribute while setting up the cluster, 
since it is used several times.



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMDbCheckpointServlet.java:
##########
@@ -244,16 +236,31 @@ private void setupCluster() throws Exception {
         anyBoolean());
   }
 
-  @ParameterizedTest
-  @MethodSource("getHttpMethods")
-  public void testEndpoint(String httpMethod) throws Exception {
-    this.method = httpMethod;
-
+  @Test
+  void testWithoutACL() throws Exception {
     conf.setBoolean(OZONE_ACL_ENABLED, false);
     conf.set(OZONE_ADMINISTRATORS, OZONE_ADMINISTRATORS_WILDCARD);
 
     setupCluster();
 
+    testBootstrapLocking();
+
+    testEndpoint("POST");
+    testEndpoint("GET");
+    testDoPostWithInvalidContentType();
+
+    prepSnapshotData();
+
+    testWriteDbDataWithoutOmSnapshot();
+    testWriteDbDataToStream();
+    testWriteDbDataWithToExcludeFileList();
+  }
+
+  private void testEndpoint(String httpMethod) throws Exception {
+    this.method = httpMethod;

Review Comment:
   It's clearer to me to pass `httpMethod` to `doEndpoint` and clean up 
`this.method`.



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

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