Skip to content

"[SUREFIRE-2167] Simplify deserialization of elapsed time in TestSuiteXmlParser" did break compability with junit LegacyXmlReportGeneratingListener #3229

@thomasmey

Description

@thomasmey

Affected version

9e971d2

Bug description

This change did break the compatiblity with junit LegacyXmlReportGeneratingListener, I did add a comment to the old issue that explains it:
#2715 (comment)

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?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions