@@ -98,7 +98,8 @@ public TestSplit(
9898 final var junitPaths = getPaths (workingDirectory , junitGlob , null );
9999 LOG .info ("Found {} JUnit report files" , junitPaths .size ());
100100 if (!junitPaths .isEmpty ()) {
101- var slowestTest = new TestCase ("" , 0d );
101+ var fastestTest = new TestCase ("" , Double .MAX_VALUE );
102+ var slowestTest = new TestCase ("" , Double .MIN_VALUE );
102103 final var xmlMapper = new XmlMapper ();
103104 for (final var junitPath : junitPaths ) {
104105 final var testSuite = xmlMapper .readValue (junitPath .toFile (), TestSuite .class );
@@ -110,11 +111,15 @@ public TestSplit(
110111 } else {
111112 LOG .info ("Skipping test {} from JUnit report" , testCase .name ());
112113 }
114+ if (testCase .time () < fastestTest .time ()) {
115+ fastestTest = testCase ;
116+ }
113117 if (testCase .time () > slowestTest .time ()) {
114118 slowestTest = testCase ;
115119 }
116120 }
117121 LOG .debug ("Found {} recorded test classes with time information" , testCases .size ());
122+ LOG .debug ("Fastest test class: {} ({})" , fastestTest .name (), formatTime (fastestTest .time ()));
118123 LOG .debug ("Slowest test class: {} ({})" , slowestTest .name (), formatTime (slowestTest .time ()));
119124 }
120125 }
0 commit comments