Tibor17 commented on a change in pull request #208: [SUREFIRE-1615] Sort 
<testcase> in the surefire-report/Test-*.xml file
URL: https://github.com/apache/maven-surefire/pull/208#discussion_r241514634
 
 

 ##########
 File path: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
 ##########
 @@ -132,9 +133,27 @@ public void testSetCompleted( WrappedReportEntry 
testSetReportEntry, TestSetStat
             createTestSuiteElement( ppw, testSetReportEntry, testSetStats, 
testSetReportEntry.elapsedTimeAsString() );
 
             showProperties( ppw, testSetReportEntry.getSystemProperties() );
-
+            
+            
+
+            //map.entrySet() Convert into list
+            List<Map.Entry<String, List<WrappedReportEntry>>> 
methodRunHistoryMapCoIntoList =
+                    new ArrayList<Map.Entry<String, 
List<WrappedReportEntry>>>( methodRunHistoryMap.entrySet() );
+            //sort
 
 Review comment:
   pls do not use comments.
   Can you use static import instead of this long line `Collections.sort`? And 
import `Map.Entry` as well. Then pls do not rephrase reference type in local 
variable name `methodRunHistoryMapCoIntoList` and use plural of 
`methodReportEntries`.
   Can you please extract this part into possibly a private static method and 
write a unit test just for that? You should call private method with PowerMock 
using `org.powermock.reflect.Whitebox;`. As a hint see our unit tests in 
Surefire.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to