Skip to content

HDDS-13738. Discovered 2 'junit-platform.properties' configuration files#9759

Merged
adoroszlai merged 2 commits intoapache:masterfrom
echonesis:HDDS-13738-dev
Feb 23, 2026
Merged

HDDS-13738. Discovered 2 'junit-platform.properties' configuration files#9759
adoroszlai merged 2 commits intoapache:masterfrom
echonesis:HDDS-13738-dev

Conversation

@echonesis
Copy link
Contributor

@echonesis echonesis commented Feb 12, 2026

What changes were proposed in this pull request?

Exclude junit-platform.properties from test-jar artifacts to prevent duplicate configuration file warnings during test execution.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-13738

How was this patch tested?

@adoroszlai adoroszlai requested a review from smengcl February 12, 2026 10:33
@adoroszlai adoroszlai requested a review from szetszwo February 20, 2026 11:04
@adoroszlai
Copy link
Contributor

Thanks @echonesis for working on this. I would like to understand how to reproduce the warning on master in the first place.

I tried running some OM test without clean after packaging:

mvn -am -pl :ozone-manager clean package
mvn -am -pl :ozone-manager -Dtest='TestParentAcl' test

but didn't get the warning, nor is there a hadoop-ozone/ozone-manager/target/test-classes-jar-tests directory.

The jar does contain the properties file:

$ unzip -t hadoop-ozone/ozone-manager/target/ozone-manager-2.2.0-SNAPSHOT-tests.jar junit-platform.properties       
Archive:  hadoop-ozone/ozone-manager/target/ozone-manager-2.2.0-SNAPSHOT-tests.jar
    testing: junit-platform.properties   OK
No errors detected in hadoop-ozone/ozone-manager/target/ozone-manager-2.2.0-SNAPSHOT-tests.jar for the 1 file tested.

@echonesis
Copy link
Contributor Author

Thanks @adoroszlai for verifying this.
You're right. I can't reproduce the warning through my local Maven builds.

The change was motivated by the fact that junit-platform.properties is module-specific JUnit configuration and ideally shouldn't be propagated to consumers via the test-jar.
However, since the warning isn't reproducible and is harmless when it does appear, maybe closing this PR is better.

@adoroszlai
Copy link
Contributor

The change was motivated by the fact that junit-platform.properties is module-specific JUnit configuration and ideally shouldn't be propagated to consumers via the test-jar.

Can we move these properties to the POM and remove the properties file?

ozone/pom.xml

Lines 2276 to 2278 in e01e4e1

<configurationParameters>junit.platform.output.capture.stdout = true
junit.platform.output.capture.stderr = true
junit.jupiter.execution.timeout.default = 5m</configurationParameters>

@szetszwo
Copy link
Contributor

@adoroszlai , @echonesis , thanks for checking. I am also NOT able to reproduce it.

From the error message below, the test-classes-jar-tests was created previously. It doesn't seem to be created anymore.

Oct 03, 2025 11:55:38 AM org.junit.platform.launcher.core.LauncherConfigurationParameters loadClasspathResource
WARNING: Discovered 2 'junit-platform.properties' configuration files on the classpath (see below); only the first (*) will be used.

  • file:/Users/szetszwo/ozone/ozone-fork/hadoop-ozone/ozone-manager/target/test-classes/junit-platform.properties (*)
  • file:/Users/szetszwo/ozone/ozone-fork/hadoop-ozone/ozone-manager/target/test-classes-jar-tests/junit-platform.properties

@echonesis
Copy link
Contributor Author

The change was motivated by the fact that junit-platform.properties is module-specific JUnit configuration and ideally shouldn't be propagated to consumers via the test-jar.

Can we move these properties to the POM and remove the properties file?

ozone/pom.xml

Lines 2276 to 2278 in e01e4e1

<configurationParameters>junit.platform.output.capture.stdout = true
junit.platform.output.capture.stderr = true
junit.jupiter.execution.timeout.default = 5m</configurationParameters>

Thanks @adoroszlai for pointing this out.
I've updated the POM and removed junit-platform.properties in the latest commit.

@echonesis
Copy link
Contributor Author

Hi @adoroszlai @szetszwo
I've updated the PR based on suggestions.
Could you please help me review this PR?
Thanks!

@adoroszlai adoroszlai merged commit c2bb1b4 into apache:master Feb 23, 2026
85 of 86 checks passed
@adoroszlai
Copy link
Contributor

Thanks @echonesis for the patch, @szetszwo for the review.

@echonesis
Copy link
Contributor Author

Thanks @adoroszlai for the review and merge, @szetszwo for the review.

@echonesis echonesis deleted the HDDS-13738-dev branch February 23, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants