[
https://issues.apache.org/jira/browse/SUREFIRE-2277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed SUREFIRE-2277.
------------------------------------
Resolution: Fixed
Fixed with
[d24adb4cd702253fa3bf1799e6f067c61d78d75f|https://gitbox.apache.org/repos/asf?p=maven-surefire.git&a=commit&h=d24adb4cd702253fa3bf1799e6f067c61d78d75f].
> RunResult#getFlakes() is lost during serialisation/deserialisation to/from
> failsafe-summary.xml
> -----------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-2277
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2277
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Failsafe Plugin, Maven Surefire Plugin
> Affects Versions: 3.5.1
> Reporter: Bing Xu
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 3.5.2
>
>
> Hello from Atlassian,
>
> I have found a bug in `RunResult.testAppendSerialization`. I don't think it
> should be passing on master.
> This test creates a `RunResult` object in-memory, serialises it, writes it to
> disk and then again deserialises the same file into a `RunResult` in-memory.
> I have run the test with the debugger and found that the final in-memory
> `RunResult` object is not the same as the initial one. The test is only
> passing because the `RunResult.flakes` field is not being considered in the
> `RunResult.equals` method (and the RunResult.equals method is used in the
> assertion within the test `RunResult.testAppendSerialization`).
> This is due to a bug in how the RunResult is converted to a
> `failsafe-summary.xml`. In the function
> `FailsafeSummaryXmlUtils.fromRunResultToFile`, `RunResult.flakes` is not
> written to the xml. To fix this issue, I have modified the
> `failsafe-summary.xsd` to include <Flakes>, which will allow Flakes to be
> persisted in the `failsafe-summary.xml`. I have also changed the
> serialisation and deserialisation methods for `RunResult` to account for
> `flakes`.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)