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 2026/06/19 12:49:41 UTC
[PR] HDDS-15621. TestSecureOzoneCluster fails locally [ozone]
adoroszlai opened a new pull request, #10550:
URL: https://github.com/apache/ozone/pull/10550
## What changes were proposed in this pull request?
`TestSecureOzoneCluster` fails locally (also reproducible in `flaky-test-check`):
```
Expecting actual:
"scm-sub@localhost"
to contain:
"<hostname>"
at org.apache.hadoop.ozone.TestSecureOzoneCluster.validateCertificate(TestSecureOzoneCluster.java:1360)
at org.apache.hadoop.ozone.TestSecureOzoneCluster.testSecureOmReInit(TestSecureOzoneCluster.java:883)
```
because SCM is configured to `localhost`:
https://github.com/apache/ozone/blob/f9552d0bb5818f3a15b90ee58b06a45c3631ae11/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java#L213
but the test expects the actual hostname in certificate issuer name.
Also improve assertions by replacing `assertTrue` with `assertThat`.
https://issues.apache.org/jira/browse/HDDS-15621
## How was this patch tested?
```
$ mvn -am -pl :ozone-integration-test -Dtest='TestSecureOzoneCluster' -DskipRecon clean test
...
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 232.2 s -- in org.apache.hadoop.ozone.TestSecureOzoneCluster
...
```
--
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-15621. TestSecureOzoneCluster fails locally [ozone]
Posted by "chungen0126 (via GitHub)" <gi...@apache.org>.
chungen0126 commented on code in PR #10550:
URL: https://github.com/apache/ozone/pull/10550#discussion_r3442749494
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java:
##########
@@ -541,9 +540,9 @@ void testSecureOMDelegationTokenSecretManagerInitializationFailure() throws Exce
conf.setTimeDuration(OMConfigKeys.DELEGATION_TOKEN_MAX_LIFETIME_KEY, 7, TimeUnit.DAYS);
IllegalArgumentException exception = assertThrows(
IllegalArgumentException.class, () -> setupOm(conf));
- assertTrue(exception.getMessage().contains("Secret key expiry duration hdds.secret.key.expiry.duration " +
+ assertThat(exception.getMessage()).contains("Secret key expiry duration hdds.secret.key.expiry.duration " +
"should be greater than value of (ozone.manager.delegation.token.max-lifetime + " +
- "ozone.manager.delegation.remover.scan.interval + hdds.secret.key.rotate.duration"));
+ "ozone.manager.delegation.remover.scan.interval + hdds.secret.key.rotate.duration");
} finally {
if (scm != null) {
scm.stop();
Review Comment:
There’s a small improvement we can make here. We’re calling scm.stop in finally blocks in some tests, while also having a stop method called for every test. This is redundant, it would be better to consolidate this logic into the stop 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-15621. TestSecureOzoneCluster fails locally [ozone]
Posted by "chungen0126 (via GitHub)" <gi...@apache.org>.
chungen0126 commented on code in PR #10550:
URL: https://github.com/apache/ozone/pull/10550#discussion_r3442913307
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java:
##########
@@ -541,9 +540,9 @@ void testSecureOMDelegationTokenSecretManagerInitializationFailure() throws Exce
conf.setTimeDuration(OMConfigKeys.DELEGATION_TOKEN_MAX_LIFETIME_KEY, 7, TimeUnit.DAYS);
IllegalArgumentException exception = assertThrows(
IllegalArgumentException.class, () -> setupOm(conf));
- assertTrue(exception.getMessage().contains("Secret key expiry duration hdds.secret.key.expiry.duration " +
+ assertThat(exception.getMessage()).contains("Secret key expiry duration hdds.secret.key.expiry.duration " +
"should be greater than value of (ozone.manager.delegation.token.max-lifetime + " +
- "ozone.manager.delegation.remover.scan.interval + hdds.secret.key.rotate.duration"));
+ "ozone.manager.delegation.remover.scan.interval + hdds.secret.key.rotate.duration");
} finally {
if (scm != null) {
scm.stop();
Review Comment:
That makes perfect sense. Let’s defer it to HDDS-12250 to keep this PR focused. Thanks for pointing that out and updating the ticket!
--
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-15621. TestSecureOzoneCluster fails locally [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #10550:
URL: https://github.com/apache/ozone/pull/10550#discussion_r3442854442
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java:
##########
@@ -541,9 +540,9 @@ void testSecureOMDelegationTokenSecretManagerInitializationFailure() throws Exce
conf.setTimeDuration(OMConfigKeys.DELEGATION_TOKEN_MAX_LIFETIME_KEY, 7, TimeUnit.DAYS);
IllegalArgumentException exception = assertThrows(
IllegalArgumentException.class, () -> setupOm(conf));
- assertTrue(exception.getMessage().contains("Secret key expiry duration hdds.secret.key.expiry.duration " +
+ assertThat(exception.getMessage()).contains("Secret key expiry duration hdds.secret.key.expiry.duration " +
"should be greater than value of (ozone.manager.delegation.token.max-lifetime + " +
- "ozone.manager.delegation.remover.scan.interval + hdds.secret.key.rotate.duration"));
+ "ozone.manager.delegation.remover.scan.interval + hdds.secret.key.rotate.duration");
} finally {
if (scm != null) {
scm.stop();
Review Comment:
Thanks @chungen0126 for the review. I'd defer that to HDDS-12250 because it would inflate the patch due to indentation change.
--
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-15621. TestSecureOzoneCluster fails locally [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #10550:
URL: https://github.com/apache/ozone/pull/10550#issuecomment-4757066456
Thanks @chungen0126, @slfan1989 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-15621. TestSecureOzoneCluster fails locally [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #10550:
URL: https://github.com/apache/ozone/pull/10550
--
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