You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2025/01/13 17:47:33 UTC
[PR] HDDS-10312. Speed up TestOMDbCheckpointServlet [ozone]
adoroszlai opened a new pull request, #7691:
URL: https://github.com/apache/ozone/pull/7691
## What changes were proposed in this pull request?
Speed up `TestOMDbCheckpointServlet` by reducing the number of clusters started: one for tests without ACL, and another for tests with ACL and SPNEGO.
Before:
```
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 257.284 s - in org.apache.hadoop.ozone.om.TestOMDbCheckpointServlet
```
After:
```
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 69.583 s - in org.apache.hadoop.ozone.om.TestOMDbCheckpointServlet
```
https://issues.apache.org/jira/browse/HDDS-10312
## How was this patch tested?
https://github.com/adoroszlai/ozone/actions/runs/12751820672
--
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-10312. Speed up TestOMDbCheckpointServlet [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #7691:
URL: https://github.com/apache/ozone/pull/7691
--
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-10312. Speed up TestOMDbCheckpointServlet [ozone]
Posted by "chungen0126 (via GitHub)" <gi...@apache.org>.
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: 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-10312. Speed up TestOMDbCheckpointServlet [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7691:
URL: https://github.com/apache/ozone/pull/7691#issuecomment-2589222538
Thanks @chungen0126 for the suggestions, patch updated.
--
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