Copilot commented on code in PR #210:
URL:
https://github.com/apache/maven-javadoc-plugin/pull/210#discussion_r4481736877
##########
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##########
@@ -886,9 +886,9 @@ void testProxyWithDummy(JavadocReport mojo) throws
Exception {
String readed = readFile(commandLine);
assertThat(readed).contains("-J-Dhttp.proxyHost=127.0.0.1").contains("-J-Dhttp.proxyPort=80");
if (SystemUtils.IS_OS_WINDOWS) {
- assertThat(readed).contains("
-J-Dhttp.nonProxyHosts=\"www.google.com^|*.somewhere.com\" ");
+ assertThat(readed).contains("
-J-Dhttp.nonProxyHosts=\"www.google.com^|*.somewhere.com\"");
} else {
- assertThat(readed).contains("
\"-J-Dhttp.nonProxyHosts=\\\"www.google.com^|*.somewhere.com\\\"\" ");
+ assertThat(readed).contains("
\"-J-Dhttp.nonProxyHosts=\\\"www.google.com^|*.somewhere.com\\\"\"");
Review Comment:
These assertions still include formatting-dependent leading
whitespace/quoting (e.g., a leading space before `-J-` and, on non-Windows, a
leading space + quote). That makes the test brittle to benign command line
formatting changes (extra/removed spaces, different quoting). Consider
asserting on the key token without surrounding whitespace (e.g.,
`-J-Dhttp.nonProxyHosts=...`), or normalize whitespace in `readed` before
asserting, so the test validates semantics rather than exact formatting.
--
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]