X-czh commented on code in PR #25877: URL: https://github.com/apache/flink/pull/25877#discussion_r1901478144
########## flink-yarn/src/test/java/org/apache/flink/yarn/UtilsTest.java: ########## @@ -674,6 +679,27 @@ void testGenerateJvmOptsString() { Utils.IGNORE_UNRECOGNIZED_VM_OPTIONS)); } + @Test + void testGetTaskManagerEnvsWithJavaHomeSet() { + final Configuration cfg = new Configuration(); + cfg.set(CoreOptions.FLINK_JAVA_HOME, "/opt/jdk"); + cfg.setString(CONTAINERIZED_TASK_MANAGER_ENV_PREFIX + "key", "val"); + final ContaineredTaskManagerParameters containeredParams = + ContaineredTaskManagerParameters.create(cfg, TASK_EXECUTOR_PROCESS_SPEC); + final Map<String, String> envVars = containeredParams.taskManagerEnv(); + assertThat(envVars).containsEntry(ENV_JAVA_HOME, "/opt/jdk").containsEntry("key", "val"); + } + + @Test + void testGetTaskManagerEnvsWithoutJavaHomeSet() { + final Configuration cfg = new Configuration(); + cfg.setString(CONTAINERIZED_TASK_MANAGER_ENV_PREFIX + "key", "val"); Review Comment: It doesn't seem to be a valid Java expr on JDK11. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org