Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Gomez Ferrer <[email protected]>
  • Loading branch information
andresgomezfrr committed Jul 31, 2023
1 parent b4e4062 commit 172afb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions jflyte/src/main/java/org/flyte/jflyte/ProjectClosure.java
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,7 @@ private static Optional<KeyValuePair> javaToolOptionsEnv(RunnableTask task) {
javaToolOptions.add("-Xmx" + maxMemory);
}

if (!task.getCustomJavaToolOptions().isEmpty()) {
javaToolOptions.addAll(task.getCustomJavaToolOptions());
}
javaToolOptions.addAll(task.getCustomJavaToolOptions());

if (javaToolOptions.isEmpty()) {
return Optional.empty();
Expand Down
6 changes: 4 additions & 2 deletions jflyte/src/test/java/org/flyte/jflyte/ProjectClosureTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ public void testCreateTaskTemplateForRunnableTaskWithResources() {
public void testCreateTaskTemplateForRunnableTaskWithCustomJavaToolOptions() {
// given
RunnableTask task =
createRunnableTask(Resources.builder().build(), List.of("-CustomFlag", "-CustomFlag2"));
createRunnableTask(
Resources.builder().build(), List.of("-CustomFlag", "-AnotherCustomFlag"));
String image = "my-image";

// when
Expand All @@ -486,7 +487,8 @@ public void testCreateTaskTemplateForRunnableTaskWithCustomJavaToolOptions() {
assertThat(
container.env(),
equalTo(
ImmutableList.of(KeyValuePair.of("JAVA_TOOL_OPTIONS", "-CustomFlag -CustomFlag2"))));
ImmutableList.of(
KeyValuePair.of("JAVA_TOOL_OPTIONS", "-CustomFlag -AnotherCustomFlag"))));
assertThat(
result.interface_(),
equalTo(
Expand Down

0 comments on commit 172afb3

Please sign in to comment.