HHH-14371 Open java.base/java.nio.charset to the unnamed module in tests

NamingHelper test needs access to Charset.defaultCharset.

Signed-off-by: Yoann Rodière <yoann@hibernate.org>
This commit is contained in:
Yoann Rodière 2020-12-14 11:51:07 +01:00 committed by Sanne Grinovero
parent f6a9338f97
commit 27c5980a20
1 changed files with 6 additions and 0 deletions

View File

@ -239,6 +239,12 @@ artifacts {
test {
systemProperty 'file.encoding', 'utf-8'
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
// See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
}
beforeTest { descriptor ->
//println "Starting test: " + descriptor
}