nils-christian commented on code in PR #3347:
URL: https://github.com/apache/maven-surefire/pull/3347#discussion_r3123388134


##########
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:
   @olamy
   
   Solved. I also added the fix for the other resources in the same test class. 
What about the failing workflow? The failures seem to be unrelated to my fix. 
Is this "normal"?
   
   



-- 
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]

Reply via email to