michael-o commented on code in PR #790:
URL: https://github.com/apache/maven-surefire/pull/790#discussion_r1820448168


##########
maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/util/FailsafeSummaryXmlUtils.java:
##########
@@ -84,12 +85,14 @@ public static RunResult toRunResult(File 
failsafeSummaryXml) throws Exception {
             String skipped = xpath.evaluate("/failsafe-summary/skipped", root);
             String failureMessage = 
xpath.evaluate("/failsafe-summary/failureMessage", root);
             String timeout = xpath.evaluate("/failsafe-summary/@timeout", 
root);
+            String flakes = xpath.evaluate("/failsafe-summary/flakes", root);
 
             return new RunResult(
                     parseInt(completed),
                     parseInt(errors),
                     parseInt(failures),
                     parseInt(skipped),
+                    isBlank(flakes) ? 0 : parseInt(flakes),

Review Comment:
   I agree here, a comment with a remove/replace to `parseInt()` in the future.



##########
surefire-api/src/main/java/org/apache/maven/surefire/api/suite/RunResult.java:
##########
@@ -202,6 +202,9 @@ public boolean equals(Object o) {
         if (skipped != runResult.skipped) {
             return false;
         }
+        if (flakes != runResult.flakes) {
+            return false;
+        }
         if (timeout != runResult.timeout) {
             return false;
         }

Review Comment:
   If you modify `equals()`, why don't you modify `hashCode()` as well?



##########
maven-surefire-plugin/src/site/resources/xsd/failsafe-summary.xsd:
##########
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- ~ Licensed to the 
Apache Software Foundation (ASF) under one ~ or more contributor license 
agreements.  See the NOTICE file ~ distributed with this work for additional 
information ~ regarding copyright ownership.  The ASF licenses this file ~ to 
you under the Apache License, Version 2.0 (the ~ "License"); you may not use 
this file except in compliance ~ with the License.  You may obtain a copy of 
the License at ~ ~     http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless 
required by applicable law or agreed to in writing, ~ software distributed 
under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR 
CONDITIONS OF ANY ~ KIND, either express or implied.  See the License for the ~ 
specific language governing permissions and limitations ~ under the License. 
--> <xsd:schema version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema";>     
<xsd:element name="failsafe-summary">         <xsd:complexType>      
        <xsd:sequence>                 <xsd:element name="completed" 
type="xsd:int"/>                 <xsd:element name="errors" type="xsd:int"/>    
             <xsd:element name="failures" type="xsd:int"/>                 
<xsd:element name="skipped" type="xsd:int"/>                 <xsd:element 
name="failureMessage" type="xsd:string" nillable="true"/>             
</xsd:sequence>             <xsd:attribute name="result" type="errorType" 
use="optional"/>             <xsd:attribute name="timeout" type="xsd:boolean" 
use="required"/>         </xsd:complexType>     </xsd:element>     
<xsd:simpleType name="errorType">         <xsd:restriction base="xsd:string">   
          <xsd:enumeration id="FAILURE" value="255"/>             
<xsd:enumeration id="NO_TESTS" value="254"/>         </xsd:restriction>     
</xsd:simpleType> </xsd:schema>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- ~ Licensed to the 
Apache Software Foundation (ASF) under one ~ or more contributor license 
agreements.  See the NOTICE file ~ distributed with this work for additional 
information ~ regarding copyright ownership.  The ASF licenses this file ~ to 
you under the Apache License, Version 2.0 (the ~ "License"); you may not use 
this file except in compliance ~ with the License.  You may obtain a copy of 
the License at ~ ~     http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless 
required by applicable law or agreed to in writing, ~ software distributed 
under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR 
CONDITIONS OF ANY ~ KIND, either express or implied.  See the License for the ~ 
specific language governing permissions and limitations ~ under the License. 
--> <xsd:schema version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema";>     
<xsd:element name="failsafe-summary">         <xsd:complexType>      
        <xsd:sequence>                 <xsd:element name="completed" 
type="xsd:int"/>                 <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="failureMessage" type="xsd:string" nillable="true"/>             
</xsd:sequence>             <xsd:attribute name="result" type="errorType" 
use="optional"/>             <xsd:attribute name="timeout" type="xsd:boolean" 
use="required"/>         </xsd:complexType>     </xsd:element>     
<xsd:simpleType name="errorType">         <xsd:restriction base="xsd:string">   
          <xsd:enumeration id="FAILURE" value="255"/>             
<xsd:enumeration id="NO_TESTS" value="254"/>         </xsd:restriction>     
</xsd:simpleType> </xsd:schema>

Review Comment:
   What happended to line ending here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to