Skip to content

Commit

Permalink
Fixes eclipse-tycho#342: Run surefire tests outside of lock
Browse files Browse the repository at this point in the history
Running tests while the lock is present leads to the tests being executed in series which severely degrades performance when the build is running with parallel maven projects.
  • Loading branch information
k-spa committed Nov 25, 2021
1 parent 65b2d37 commit 064f756
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
return;
}
if (shouldRun()) {
EquinoxInstallation equinoxTestRuntime;
synchronized (LOCK) {
EquinoxInstallation equinoxTestRuntime;
if ("p2Installed".equals(testRuntime)) {
equinoxTestRuntime = createProvisionedInstallation();
} else if ("default".equals(testRuntime)) {
Expand All @@ -683,9 +683,9 @@ public void execute() throws MojoExecutionException, MojoFailureException {
throw new MojoExecutionException("Configured testRuntime parameter value '" + testRuntime
+ "' is unkown. Allowed values: 'default', 'p2Installed'.");
}
if (equinoxTestRuntime != null) {
runTest(equinoxTestRuntime);
}
}
if (equinoxTestRuntime != null) {
runTest(equinoxTestRuntime);
}
}
}
Expand Down

0 comments on commit 064f756

Please sign in to comment.