Skip to content

Commit

Permalink
Swap to minOccurs=0 from nillable in the failsafe-summary.xsd for the
Browse files Browse the repository at this point in the history
flakes element. Add a comment noting that flakes will be expected in the
failsafe-summary in the future.

Incorporate the value of flakes into RunResult.hashCode() to be
consistent with the new implementation of toEquals
  • Loading branch information
bxu-atl committed Oct 29, 2024
1 parent 85d733a commit 9d2afac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public static RunResult toRunResult(File failsafeSummaryXml) throws Exception {
parseInt(errors),
parseInt(failures),
parseInt(skipped),
// Backwards compatability - to be replaced with parseInt in a future release
isBlank(flakes) ? 0 : parseInt(flakes),
isBlank(failureMessage) ? null : unescapeXml(failureMessage),
parseBoolean(timeout));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<xsd:element name="errors" type="xsd:int"/>
<xsd:element name="failures" type="xsd:int"/>
<xsd:element name="skipped" type="xsd:int"/>
<xsd:element name="flakes" type="xsd:int" nillable="true"/>
<xsd:element name="flakes" type="xsd:int" minOccurs="0"/>
<xsd:element name="failureMessage" type="xsd:string" nillable="true"/>
</xsd:sequence>
<xsd:attribute name="result" type="errorType" use="optional"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public int hashCode() {
result = 31 * result + errors;
result = 31 * result + failures;
result = 31 * result + skipped;
result = 31 * result + flakes;
result = 31 * result + (failure != null ? failure.hashCode() : 0);
result = 31 * result + (timeout ? 1 : 0);
return result;
Expand Down

0 comments on commit 9d2afac

Please sign in to comment.