apache / apache/maven-surefire
"[SUREFIRE-2167] Simplify deserialization of elapsed time in TestSuiteXmlParser" did break compability with junit LegacyXmlReportGeneratingListener
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
### Affected version
https://github.com/apache/maven-surefire/commit/9e971d20c82f4c222b0bd8cb34f646433e00252b
### Bug description
This change did break the compatiblity with junit LegacyXmlReportGeneratingListener, I did add a comment to the old issue that explains it:
https://github.com/apache/maven-surefire/issues/2715#issuecomment-3636000251
```
Sadly this change did break the reporting of reports generated with LegacyXmlReportGeneratingListener in junit. The junit code seems create the time attributlike the maven-surefire reporting plugin did parse before, i.e. via NumberFormat.parse().
See also https://github.com/junit-team/junit-framework/blob/main/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportWriter.java#L167
For testsuites the Float.parse seems to work when the time number is smaller then 1000, the time attribute will look like this then: time="394.879", but when the testsuite runs longer the created time attribute will look like time="1,323.333", which make Float parse fail.
can you please revert this change and make things compatible again?
```
Contributor guide
Assessment
This issue has not been assessed yet.