Bing Xu created SUREFIRE-2277: --------------------------------- Summary: The value of RunResult flakes field is lost during serialisation and deserialisation to and 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
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)