adoroszlai commented on code in PR #12031:
URL: https://github.com/apache/ozone/pull/12031#discussion_r4547552028
##########
hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/conf/TestGeneratedConfigurationOverwrite.java:
##########
@@ -35,9 +35,9 @@
public class TestGeneratedConfigurationOverwrite {
private final Path generatedConfigurationPath =
- Paths.get("target/test-classes/hdds-common-default.xml");
+ Paths.get("target/test-classes/hdds-common-test-default.xml");
private final Path generatedConfigurationPathBak =
- Paths.get("target/test-classes/hdds-common-default.xml.bak");
+ Paths.get("target/test-classes/hdds-common-test-default.xml.bak");
Review Comment:
This test class verifies behavior when XML file is missing. By adding
`-test-default.xml` only on demand, we can remove the setup/teardown needed for
simulating missing XML. (i.e. `@BeforeEach`, `@AfterEach` methods can be
dropped.)
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/conf/OzoneConfiguration.java:
##########
@@ -239,6 +239,8 @@ public static List<String> getConfigurationResourceFiles() {
};
for (String module : modules) {
resourceFiles.add(module + "-default.xml");
+ // Generated from test sources; present only on test classpaths.
+ resourceFiles.add(module + "-test-default.xml");
Review Comment:
```suggestion
```
--
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]