Samrat002 commented on code in PR #25877:
URL: https://github.com/apache/flink/pull/25877#discussion_r1901518910
##########
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:
Ahh! checked the documentation and it says since java 15
thank you.
--
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]