Skip to content

Conversation

@fjtirado
Copy link
Collaborator

Enable test only in linux (till we implement for other Operating systems)
Run asynchronously

softly.assertThat(outputModel.asText().get()).isNotEmpty();
softly.assertThat(outputModel.asText().get()).contains("ls: cannot access");
softly.assertThat(outputModel.asText().get()).contains("No such file or directory");
softly.assertThat(outputModel.asText().get()).contains("ls");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test only worked if the locale of the OS was english, so I do the trick of just checking that the stderr contains "ls"

Enable test only in linux (till we implement for other Operating
systems)
Run asynchrnously

Signed-off-by: fjtirado <ftirados@redhat.com>
@fjtirado fjtirado force-pushed the Run_shell_minor_improvements branch from e01d199 to 13f154f Compare October 24, 2025 15:16
return input;
}

return taskConfiguration.isAwait()
Copy link
Collaborator Author

@fjtirado fjtirado Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this one was not needed, but I love ternary operator and could not refrain, sorry ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆

if (entry.getValue() == null) {
commandBuilder.append(" ").append(argKey);
continue;
commandBuilder
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to avoid the use of continue, which in this case was possible

: shellCommand;

StringBuilder commandBuilder = new StringBuilder(command);
StringBuilder commandBuilder =
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saving a variable declaration

ProcessBuilder processBuilder = this.processBuilderSupplier.apply(workflowContext, taskContext);
return CompletableFuture.completedFuture(
this.shellResultSupplier.apply(taskContext, input, processBuilder));
return CompletableFuture.supplyAsync(
Copy link
Contributor

@mcruzdev mcruzdev Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot about that, nice

@fjtirado fjtirado merged commit ab5745d into serverlessworkflow:main Oct 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants