Bug 545894 - Support parallel mode with Junit 5
Summary: Support parallel mode with Junit 5
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 382732
Blocks:
  Show dependency tree
 
Reported: 2019-03-28 10:49 EDT by Arnaud MERGEY CLA
Modified: 2021-04-28 16:52 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud MERGEY CLA 2019-03-28 10:49:27 EDT
Using tycho 1.3.0, build of a test project fails with following error:

Provider org.eclipse.tycho.surefire.provider.impl.JUnit5Provider does
not support parallel
mode. org.eclipse.tycho.surefire.provider.impl.JUnit47Provider
(i.e. JUnit >= 4.7) is required for this.

The error seems wrong because junit 5 is > to junit 4.7 so parallel
mode should be working with junit 5
Comment 1 Martin Schreiber CLA 2019-04-06 01:31:55 EDT
Yes, the error message is confiusing.
According to the junit 5 user guide [1], the parallel mode in junit5 (>=v5.3) is currently only experimental und could only be enabled/disabled, which differs from junit4.7 where 3 different modes (class, method, both) are supported. So we could not use the same configuration parameter. 

Have you tried to specify the provider property "junit.jupiter.execution.parallel.enabled"?

<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
  <providerProperties>
    <junit.jupiter.execution.parallel.enabled>true</junit.jupiter.execution.parallel.enabled>
  </providerProperties>
</configuration>


[1] https://junit.org/junit5/docs/current/user-guide/#writing-tests-parallel-execution
Comment 2 Arnaud MERGEY CLA 2019-04-12 05:54:13 EDT
Thanks, I tried but it does not seem to have impacts for Junit 4 tests (We still  
have tests to migrate) 

I even tried with 

						<junit.jupiter.execution.parallel.enabled>true</junit.jupiter.execution.parallel.enabled>
						<junit.jupiter.execution.parallel.config.strategy>fixed</junit.jupiter.execution.parallel.config.strategy> 
 						<junit.jupiter.execution.parallel.config.fixed.parallelism>10</junit.jupiter.execution.parallel.config.fixed.parallelism> 
						<junit.jupiter.execution.parallel.mode.default>concurrent</junit.jupiter.execution.parallel.mode.default>
Comment 3 Mickael Istria CLA 2021-04-08 18:04:53 EDT
Eclipse Tycho is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/tycho/issues/ instead. If this issue is relevant to you, your action is required.
0. Verify this issue is still happening with latest Tycho 2.4.0-SNAPSHOT
  if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done
  if issue is still present when latest release:
* Create a new issue at https://github.com/eclipse/tycho/issues/
  ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  ** In the GitHub description, start with a link to this bugzilla ticket
  ** Optionally add new content to the description if it can helps towards resolution
  ** Submit GitHub issue
* Update bugzilla ticket
  ** Add to "See also" property (up right column) the link to the newly created GitHub issue
  ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  ** Set status as CLOSED MOVED
  ** Submit

All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for Tycho will be archived and made read-only.