[ https://issues.apache.org/jira/browse/SUREFIRE-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420233#comment-16420233 ]
Emond Papegaaij commented on SUREFIRE-1387: ------------------------------------------- Ok, I must have missed that line in the documentation when I set this up. In that case, this issue can be changed to a feature request. It would be nice if {{balanced}} would also work in combination with {{forkCount}}, just as the other {{runOrder}}s do. We need to fork the VM for these tests to run concurrently. As I've said before, for now we order our tests manually, which gives us even better execution times. > runTime always 0 in statistics, breaking runOrder=balanced > ---------------------------------------------------------- > > Key: SUREFIRE-1387 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1387 > Project: Maven Surefire > Issue Type: Bug > Components: Junit 4.7+ (parallel) support > Affects Versions: 2.20 > Reporter: Emond Papegaaij > Assignee: Tibor Digana > Priority: Major > Fix For: Backlog > > > We are using parallized tests to speed up the builds, however tests are > executed in less than optimal order. `<runOrder>balanced</runOrder>` is > supposed to improve the ordering, but it requires statistics in a > `.surefire-XXXXX` file. A maven build does write this file, but runTime is > reported as 0 for all tests. Every line in the file looks like (where n is > the number of executions): > {code} > n,0,method(class) > {code} > I've traced the source of these '0's to nulls in the `ForkedBooter` protocol. > These are written by `ForkingRunListener.testSucceeded` on this stack: > {code} > Thread [main] (Suspended (breakpoint at line 151 in ForkingRunListener)) > owns: Notifier (id=14012) > ForkingRunListener.testSucceeded(ReportEntry) line: 151 > JUnit4RunListener.testFinished(Description) line: 140 > SynchronizedRunListener.testFinished(Description) line: 56 > RunNotifier$7.notifyListener(RunListener) line: 190 > RunNotifier$7(RunNotifier$SafeNotifier).run() line: 72 > Notifier(RunNotifier).fireTestFinished(Description) line: 187 > JUnitSupervisor.afterFeature(FeatureInfo) line: 193 > ParameterizedSpecRunner(BaseSpecRunner).runFeature() line: 239 > ParameterizedSpecRunner(BaseSpecRunner).runFeatures() line: 188 > ParameterizedSpecRunner(BaseSpecRunner).doRunSpec() line: 98 > BaseSpecRunner$1.invoke(Object, Object...) line: 84 > ParameterizedSpecRunner(BaseSpecRunner).invokeRaw(Object, MethodInfo, > Object...) line: 481 > ParameterizedSpecRunner(BaseSpecRunner).invoke(Object, MethodInfo, > Object...) line: 464 > ParameterizedSpecRunner(BaseSpecRunner).runSpec() line: 76 > ParameterizedSpecRunner(BaseSpecRunner).run() line: 67 > ArquillianSputnik.run(RunNotifier) line: 135 > JUnit4Provider.execute(Class<?>, Notifier, Filter) line: 365 > JUnit4Provider.executeWithRerun(Class<?>, Notifier) line: 272 > JUnit4Provider.executeTestSet(Class<?>, RunListener, Notifier) line: > 236 > JUnit4Provider.invoke(Object) line: 159 > ForkedBooter.invokeProviderInSameClassLoader(Object, Object, > ProviderConfiguration, boolean, StartupConfiguration, boolean) line: 386 > ForkedBooter.runSuitesInProcess(Object, StartupConfiguration, > ProviderConfiguration, PrintStream) line: 323 > ForkedBooter.main(String...) line: 143 > {code} > `JUnit4RunListener.testFinished(Description)` always creates TestReports with > 'elapsed == null'. > We are using the following configuration: > {code} > <configuration> > <forkCount>3</forkCount> > <reuseForks>true</reuseForks> > <runOrder>balanced</runOrder> > <useManifestOnlyJar>false</useManifestOnlyJar> > </configuration> > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)