Skip to content

Commit 7589c44

Browse files
trancexpresslaeubi
authored andcommitted
Removed check for mixed JUnit 5 and 6 versions, adjusted error message in RemotePluginTestRunner
Fixes: #2045
1 parent 27f380f commit 7589c44

File tree

6 files changed

+1
-115
lines changed

6 files changed

+1
-115
lines changed

ui/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/RemotePluginTestRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private static String getState(int state) {
134134
private static ClassLoader createJUnit5PluginClassLoader(String testPluginName) {
135135
Bundle testBundle = Platform.getBundle(testPluginName);
136136
if (testBundle == null) {
137-
throw new IllegalArgumentException("Bundle \"" + testPluginName + "\" not found. Possible causes include missing dependencies, too restrictive version ranges, or a non-matching required execution environment."); //$NON-NLS-1$ //$NON-NLS-2$
137+
throw new IllegalArgumentException("Bundle \"" + testPluginName + "\" not found. Possible causes include missing dependencies, too restrictive version ranges, mixed JUnit versions, or a non-matching required execution environment."); //$NON-NLS-1$ //$NON-NLS-2$
138138
}
139139
Bundle junit5RuntimeBundle = Platform.getBundle("org.eclipse.jdt.junit5.runtime"); //$NON-NLS-1$
140140
List<Bundle> platformEngineBundles = findTestEngineBundles();

ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/JUnitLaunchValidationOperation.java

Lines changed: 0 additions & 98 deletions
This file was deleted.

ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PDEMessages.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public class PDEMessages extends NLS {
3636
public static String WorkbenchLauncherConfigurationDelegate_noStartup;
3737
public static String JUnitLaunchConfiguration_error_notaplugin;
3838
public static String JUnitLaunchConfiguration_error_missingPlugin;
39-
public static String JUnitLaunchConfiguration_error_JUnitLaunchAndRuntimeMissmatch;
4039

4140
public static String OSGiLaunchConfiguration_cannotFindLaunchConfiguration;
4241
public static String OSGiLaunchConfiguration_selected;

ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/pderesources.properties

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ WorkbenchLauncherConfigurationDelegate_jrePathNotFound = The installation path t
2525
WorkbenchLauncherConfigurationDelegate_noStartup = Launching failed. Bootstrap code cannot be found.
2626
JUnitLaunchConfiguration_error_notaplugin = Could not launch the JUnit plug-in tests because project ''{0}'' is not a plug-in project.
2727
JUnitLaunchConfiguration_error_missingPlugin = Required plug-in ''{0}'' could not be found.
28-
JUnitLaunchConfiguration_error_JUnitLaunchAndRuntimeMissmatch = Launch targets JUnit {0} but contains JUnit {1} bundles.\n\
29-
Therefore this launch is expected to fail.\n\
30-
\n\
31-
Either update the launch configuration to target JUnit {1},\n\
32-
or restrict the versions of JUnit Jupiter and JUnit Platform\n\
33-
by specifying corresponding version bounds\n\
34-
in your test-project to match only JUnit {0}.
3528

3629
OSGiLaunchConfiguration_cannotFindLaunchConfiguration=Cannot find the {0} OSGi framework.
3730
OSGiLaunchConfiguration_selected=selected

ui/org.eclipse.pde.launching/src/org/eclipse/pde/launching/JUnitLaunchConfigurationDelegate.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
import org.eclipse.pde.internal.core.util.VersionUtil;
7272
import org.eclipse.pde.internal.launching.IPDEConstants;
7373
import org.eclipse.pde.internal.launching.JUnitLaunchRequirements;
74-
import org.eclipse.pde.internal.launching.JUnitLaunchValidationOperation;
7574
import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
7675
import org.eclipse.pde.internal.launching.PDEMessages;
7776
import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
@@ -519,9 +518,6 @@ protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch
519518
fAllBundles = fModels.keySet().stream().collect(Collectors.groupingBy(m -> m.getPluginBase().getId(), LinkedHashMap::new, Collectors.toCollection(ArrayList::new)));
520519
launchMode = launch.getLaunchMode();
521520

522-
JUnitLaunchValidationOperation junitValidation = new JUnitLaunchValidationOperation(configuration, fModels.keySet());
523-
LaunchPluginValidator.runValidationOperation(junitValidation, monitor);
524-
525521
// implicitly add the plug-ins required for JUnit testing if necessary
526522
JUnitLaunchRequirements.addRequiredJunitRuntimePlugins(configuration, fAllBundles, fModels);
527523

ui/org.eclipse.pde.unittest.junit/src/org/eclipse/pde/unittest/junit/launcher/JUnitPluginLaunchConfigurationDelegate.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
import org.eclipse.pde.internal.core.util.CoreUtility;
8787
import org.eclipse.pde.internal.launching.IPDEConstants;
8888
import org.eclipse.pde.internal.launching.JUnitLaunchRequirements;
89-
import org.eclipse.pde.internal.launching.JUnitLaunchValidationOperation;
9089
import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
9190
import org.eclipse.pde.internal.launching.launcher.EclipsePluginValidationOperation;
9291
import org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper;
@@ -360,9 +359,6 @@ protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch
360359
fAllBundles = fModels.keySet().stream().collect(Collectors.groupingBy(m -> m.getPluginBase().getId(),
361360
LinkedHashMap::new, Collectors.toCollection(ArrayList::new)));
362361

363-
JUnitLaunchValidationOperation junitValidation = new JUnitLaunchValidationOperation(configuration, fModels.keySet());
364-
LaunchPluginValidator.runValidationOperation(junitValidation, monitor);
365-
366362
// implicitly add the plug-ins required for JUnit testing if necessary
367363
JUnitLaunchRequirements.addRequiredJunitRuntimePlugins(configuration, fAllBundles, fModels);
368364

0 commit comments

Comments
 (0)