|
13 | 13 | *******************************************************************************/ |
14 | 14 | package org.eclipse.jdt.debug.tests.core; |
15 | 15 |
|
16 | | -import static org.junit.Assume.assumeTrue; |
17 | | - |
18 | 16 | import java.io.File; |
19 | 17 | import java.io.StringReader; |
20 | 18 | import java.util.ArrayList; |
@@ -65,6 +63,10 @@ public MultiReleaseLaunchTests(String name) { |
65 | 63 | @Override |
66 | 64 | protected void setUp() throws Exception { |
67 | 65 | super.setUp(); |
| 66 | + // see https://github.com/eclipse-jdt/eclipse.jdt.debug/issues/843 |
| 67 | + if (!Platform.OS.isLinux()) { // JUnit 3, don't use assumeTrue, the thrown AssumptionViolatedException is treated as an error |
| 68 | + return; |
| 69 | + } |
68 | 70 | final Set<File> existingLocations = new HashSet<>(); |
69 | 71 | List<RequiredJavaVersion> requiredJavaVersions = new ArrayList<>(List.of(JAVA_11, JAVA_17, JAVA_21)); |
70 | 72 | removeExistingJavaVersions(requiredJavaVersions, existingLocations); |
@@ -115,7 +117,10 @@ protected IJavaProject getProjectContext() { |
115 | 117 | } |
116 | 118 |
|
117 | 119 | public void testMultiReleaseLaunch() throws Exception { |
118 | | - assumeTrue("Not on Linux", Platform.OS.isLinux()); |
| 120 | + // see https://github.com/eclipse-jdt/eclipse.jdt.debug/issues/843 |
| 121 | + if (!Platform.OS.isLinux()) { // JUnit 3, don't use assumeTrue, the thrown AssumptionViolatedException is treated as an error |
| 122 | + return; |
| 123 | + } |
119 | 124 | ILaunchConfiguration config = getLaunchConfiguration("p.Main"); |
120 | 125 | Properties result = launchAndReadResult(config, 11); |
121 | 126 | assertTrue("Was not launched with a proper Java installation " + result, JAVA_11.matches(result.getProperty("Java"))); |
|
0 commit comments