Skip to content

Commit 29202d1

Browse files
committed
8349648: Test tools/jpackage/share/JLinkOptionsTest.java fails with --enable-linkable-runtime set after JDK-8346434
Reviewed-by: sgehwolf, asemenyuk
1 parent 24b7f81 commit 29202d1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/jdk/tools/jpackage/share/JLinkOptionsTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public static Collection input() {
5858
new String[]{"jdk.jartool", "jdk.unsupported"},
5959
null,
6060
},
61+
6162
// multiple jlink-options
6263
{"com.other/com.other.Hello", new String[]{
6364
"--jlink-options",
@@ -69,6 +70,7 @@ public static Collection input() {
6970
new String[]{"java.smartcardio", "jdk.crypto.cryptoki"},
7071
null,
7172
},
73+
7274
// bind-services
7375
{"Hello", new String[]{
7476
"--jlink-options",
@@ -139,13 +141,14 @@ public void test(String javaAppDesc, String[] jpackageArgs, String[] required, S
139141

140142
@Test
141143
public void testNoBindServicesByDefault() {
142-
final var defaultModules = getModulesInRuntime();
143-
final var modulesWithBindServices = getModulesInRuntime("--bind-services");
144+
final var defaultModules = getModulesInRuntime("--limit-modules java.smartcardio,jdk.crypto.cryptoki,java.desktop");
145+
final var modulesWithBindServices = getModulesInRuntime("--bind-services --limit-modules java.smartcardio,jdk.crypto.cryptoki,java.desktop");
144146

145147
final var moduleComm = Comm.compare(defaultModules, modulesWithBindServices);
146148

147149
TKit.assertStringListEquals(List.of(), moduleComm.unique1().stream().toList(),
148150
"Check '--bind-services' option doesn't remove modules");
151+
// with the limited set of modules, we expect that jdk.crypto.cryptoki be added through --bind-services
149152
TKit.assertNotEquals("", moduleComm.unique2().stream().sorted().collect(Collectors.joining(",")),
150153
"Check '--bind-services' option adds modules");
151154
}

0 commit comments

Comments
 (0)