[
https://issues.apache.org/jira/browse/FLINK-33311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17782684#comment-17782684
]
Sergey Nuyanzin commented on FLINK-33311:
-----------------------------------------
It seems I found the root cause.
[~chesnay] I submitted a PR, would be great if you have a look.
Also below there is a description of the problem
In {{org.apache.flink.runtime.testutils.TestJvmProcess#startProcess}} there is
such code snippet
{code:java}
String[] cmd =
new String[] {
javaCommandPath,
"-Dlog.level=DEBUG",
"-Dlog4j.configurationFile=file:" + log4jConfigFilePath,
"-Xms" + jvmMemoryInMb + "m",
"-Xmx" + jvmMemoryInMb + "m",
"-classpath",
getCurrentClasspath(),
"-XX:+IgnoreUnrecognizedVMOptions",
getEntryPointClassName()
};
String[] jvmArgs = getJvmArgs();
if (jvmArgs != null && jvmArgs.length > 0) {
cmd = ArrayUtils.addAll(cmd, jvmArgs);
}
final String moduleConfig = System.getProperty("surefire.module.config");
if (moduleConfig != null) {
cmd = ArrayUtils.addAll(cmd, moduleConfig.split(" "));
}
{code}
the problem with this code that {{surefire}} properties are after entry point
classname...
Also probably {{jvmArgs}} is a very confusing name since in fact it is about
args for main method and not for jvm...
> FlinkSecurityManagerITCase fails on java 21
> -------------------------------------------
>
> Key: FLINK-33311
> URL: https://issues.apache.org/jira/browse/FLINK-33311
> Project: Flink
> Issue Type: Sub-task
> Reporter: Sergey Nuyanzin
> Priority: Major
> Labels: pull-request-available
>
> There are 2 tests {{testForcedJVMExit}} and {{testIgnoredJVMExit}} failing
> like
> {noformat}
> expected: 222
> but was: 1
> at
> java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
> at
> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
> at
> org.apache.flink.runtime.util.FlinkSecurityManagerITCase.testForcedJVMExit(FlinkSecurityManagerITCase.java:51)
> at
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> {noformat}
> and
> {noformat}
> expected: 0
> but was: 1
> at
> java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
> at
> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
> at
> org.apache.flink.runtime.util.FlinkSecurityManagerITCase.testIgnoredJVMExit(FlinkSecurityManagerITCase.java:65)
> at
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)