Skip to content

Commit 6c75a7b

Browse files
committed
Adapt tests to migration to javax-bundles provided by Jakarta
1 parent a82abd2 commit 6c75a7b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Require-Bundle: org.junit,
4343
org.eclipse.platform,
4444
org.eclipse.ui.ide.application
4545
Import-Package: javax.annotation;version="[1.3.0,2.0.0)",
46+
javax.inject;version="[1.0.0,2.0.0)",
4647
org.assertj.core.api;version="3.14.0",
4748
org.assertj.core.presentation;version="3.21.0",
4849
org.eclipse.pde.internal.build,

ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/launcher/FeatureBasedLaunchTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import org.eclipse.pde.ui.tests.util.TargetPlatformUtil;
5252
import org.junit.*;
5353
import org.junit.rules.TemporaryFolder;
54+
import org.osgi.framework.FrameworkUtil;
5455

5556
public class FeatureBasedLaunchTest extends AbstractLaunchTest {
5657

@@ -68,9 +69,9 @@ public void setup() throws Exception {
6869
@Test
6970
public void testGetMergedBundleMap_autostartLevels() throws Throwable {
7071
TargetPlatformUtil.setRunningPlatformAsTarget();
71-
72+
String javaxInjectProvider = FrameworkUtil.getBundle(javax.inject.Inject.class).getSymbolicName();
7273
createFeatureProject(FeatureBasedLaunchTest.class.getName() + "-feature", "1.0.0", f -> {
73-
addIncludedPlugin(f, "javax.inject", DEFAULT_VERSION);
74+
addIncludedPlugin(f, javaxInjectProvider, DEFAULT_VERSION);
7475
addIncludedPlugin(f, "org.eclipse.core.runtime", DEFAULT_VERSION);
7576
addIncludedPlugin(f, "org.eclipse.ui", DEFAULT_VERSION);
7677
});
@@ -84,9 +85,9 @@ public void testGetMergedBundleMap_autostartLevels() throws Throwable {
8485
}
8586

8687
assertThat(byId)//
87-
.as("old entry without configuration has defaults").containsEntry("javax.inject", "default:default")
88+
.as("old entry without config has defaults").containsEntry(javaxInjectProvider, "default:default")
8889
.as("use configured start-levels").containsEntry("org.eclipse.core.runtime", "1:true")
89-
.as("ignore configured start-levels of uncheckedplugin")
90+
.as("ignore configured start-levels of unchecked plugin")
9091
.containsEntry("org.eclipse.ui", "default:default");
9192
}
9293

0 commit comments

Comments
 (0)