Skip to content

Commit 47004d9

Browse files
committed
chore: prevent jvm sharing-warning
1 parent 35cd244 commit 47004d9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build-logic/src/main/groovy/buildlogic.java-test-mockito-conventions.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@ dependencies {
1313
}
1414

1515
tasks.withType(Test).configureEach { Test task ->
16-
task.jvmArgs("-javaagent:${configurations.mockitoAgent.asPath}")
16+
task.jvmArgs = [
17+
"-javaagent:${configurations.mockitoAgent.asPath}",
18+
// disable class data sharing, to prevent "OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended"
19+
// see https://github.com/mockito/mockito/issues/3111#issuecomment-1733939989
20+
'-Xshare:off',
21+
]
1722
}

0 commit comments

Comments
 (0)