-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Milestone
Description
Currently, the SystemCommandTasklet
is not so test-friendly, mainly due to the usage of Runtime.getRuntime().exec(...)
:
Line 103 in 6b4c916
Process process = Runtime.getRuntime().exec(command, environmentParams, workingDirectory); |
For example, testing a job or a step with this tasklet defined does not work properly if the platform running the test does not have the target command available.
Would it make sense to decouple the Runtime
dependency from this tasklet, so that a test can have more control over it? I would propose a pattern similar to the SystemExiter and JvmSystemExiter.
I am happy to submit a proposal in case the idea is accepted.