Skip to content

Commit 27985b1

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.
1 parent bad4e18 commit 27985b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private void configureTests(Project project, Test test) {
6464
}
6565
test.jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED",
6666
"--add-opens=java.base/java.util=ALL-UNNAMED",
67-
"-Djava.locale.providers=COMPAT");
67+
"-Djava.locale.providers=COMPAT", "-Xshare:off");
6868
}
6969

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

0 commit comments

Comments
 (0)