olamy commented on code in PR #3347:
URL: https://github.com/apache/maven-surefire/pull/3347#discussion_r3120795918
##########
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java:
##########
@@ -654,6 +654,45 @@ public void
testReporterHandlesATestWithoutMessageAndWithEmptyStackTrace() {
reporter.testSetCompleted(testReport, stats);
}
+ @Test
+ public void testClassnameUsesActualClassNameWhenPhrasedClassNameDisabled()
throws IOException {
+ String actualClassName = "MyTest";
+ String displayName = "NewName";
+
+ ReportEntry reportEntry =
+ new SimpleReportEntry(NORMAL_RUN, 0L, actualClassName,
displayName, TEST_ONE, null, 12);
+ WrappedReportEntry testSetReportEntry =
+ new WrappedReportEntry(reportEntry, SUCCESS, 1771085631L, 12,
null, null, systemProps());
+ expectedReportFile = new File(reportDir, "TEST-" + actualClassName +
".xml");
+
+ stats.testSucceeded(testSetReportEntry);
+
+ StatelessXmlReporter reporter = new StatelessXmlReporter(
+ reportDir,
+ null,
+ false,
+ 0,
+ new ConcurrentHashMap<>(),
+ XSD,
+ "3.0.2",
+ false,
+ false,
+ false, // phrasedClassName = false
+ false,
+ true,
+ true,
+ false);
+ reporter.testSetCompleted(testSetReportEntry, stats);
+
+ FileInputStream fileInputStream = new
FileInputStream(expectedReportFile);
Review Comment:
please try with resources. I'm not sure if `Xpp3DomBuilder` close the
`FileInputStream`
--
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]