Timeout does not cause exception / error escalation #129
The timeout implemented in RunCommand.java does not trigger a proper error escalation. I still don't get an exitcode after a timeout in the onvoking process. My java skills are slightly rusty - so correct me if I'm wrong, but from your code (lines 203-209) I understand you're using java.util.concurrent.ExecutorService.shutdown() which causes an orderly shutdown and after that in line 209 you return 'returnCode' which I suppose is initialized to literally zero as well. Therefore an invoking process does not get notified, that an irregular termination (due to a timeout) occurred, which makes error handling cumbersome. IMHO a timeout should push an error/exception up the call-stack.
...and here's a suggestion, how this issue might get resolved. Take it with a grain of salt, as I'm not a Java expert though...
According to the API doc awaitTermination() returns true if this executor terminated and false if the timeout elapsed before termination.
The text was updated successfully, but these errors were encountered: