spring-batch
spring-batch copied to clipboard
Add option to consume error and input streams to SystemCommandTasklet [BATCH-2318]
Peter Rietzler opened BATCH-2318 and commented
If a system command outputs data to either stderr or stdout, then Java blocks once a certain amount of data has been written to it. The tasklet will hang until it reaches the configured timeout in this case.
The following part of a Spock specification should show the problem:
def "streams of system command are consumed"() {
def file = new File(tempDir, "a")
file.text = (1..20000).join("")
when:
def execution = launchJob(command: "cat " + file.absolutePath)
then:
execution.exitStatus == ExitStatus.COMPLETED
}
Issue Links:
- BATCH-2329 Add log management to SystemCommandTasklet