Skip to content

Commit 1e97b21

Browse files
committed
Disable class data sharing (CDS) for tests
Prior to this commit, the Gradle build output the following warning multiple times. OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended Since we don't need CDS enabled for our tests, I've added `-Xshare:off` as a JVM argument for our tests to disable CDS. (cherry picked from commit 27985b1)
1 parent 5e4e530 commit 1e97b21

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

buildSrc/src/main/java/org/springframework/build/TestConventions.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,11 @@ private void configureTests(Project project, Test test) {
6262
if (project.hasProperty("testGroups")) {
6363
test.systemProperty("testGroups", project.getProperties().get("testGroups"));
6464
}
65-
test.jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED",
66-
"--add-opens=java.base/java.util=ALL-UNNAMED");
65+
test.jvmArgs(
66+
"--add-opens=java.base/java.lang=ALL-UNNAMED",
67+
"--add-opens=java.base/java.util=ALL-UNNAMED",
68+
"-Xshare:off"
69+
);
6770
}
6871

6972
private void configureTestRetryPlugin(Project project, Test test) {

0 commit comments

Comments
 (0)