tvalentyn commented on code in PR #39283:
URL: https://github.com/apache/beam/pull/39283#discussion_r3560377281
##########
sdks/java/io/hadoop-format/build.gradle:
##########
@@ -202,3 +202,24 @@ static def createTaskNames(Map<String, String>
hadoopVersions, String suffix) {
.map{num -> "runHadoopFormatIO$num$suffix"}
.collect(Collectors.toList())
}
+
+def testJavaVer = project.findProperty('testJavaVersion') ?:
JavaVersion.current().getMajorVersion()
+def isJava17OrHigher = testJavaVer.toInteger() >= 17
+
+tasks.withType(Test).configureEach {
+ if (isJava17OrHigher) {
+ systemProperty 'java.security.manager', 'allow'
+ }
+ // Open and export modules for embedded Cassandra and Elasticsearch under
Java 17+
+ jvmArgs '--add-exports=java.base/sun.nio.ch=ALL-UNNAMED',
+ '--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED',
+ '--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED',
+ '--add-opens=java.base/sun.nio.ch=ALL-UNNAMED',
+ '--add-opens=java.base/java.lang=ALL-UNNAMED',
+ '--add-opens=java.base/java.util=ALL-UNNAMED',
+ '--add-opens=java.base/java.util.concurrent=ALL-UNNAMED',
+ '--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED',
+ '--add-opens=java.base/java.io=ALL-UNNAMED',
+ '--add-opens=java.base/java.net=ALL-UNNAMED',
+ '--add-opens=java.base/java.nio=ALL-UNNAMED'
+}
Review Comment:
based on
https://github.com/apache/beam/blob/3e7885d6125ac2f9e52fa0cbbb784f563fe916b8/sdks/java/io/cassandra/build.gradle#L80
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]