mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Fixed a test related to wait
This commit is contained in:
@@ -117,6 +117,7 @@ func (e *UniversalExecutor) Wait() (*ProcessState, error) {
|
||||
}
|
||||
|
||||
func (e *UniversalExecutor) wait() {
|
||||
defer close(e.processExited)
|
||||
err := e.cmd.Wait()
|
||||
if err == nil {
|
||||
e.exitState = &ProcessState{Pid: 0, ExitCode: 0, Time: time.Now()}
|
||||
@@ -135,7 +136,6 @@ func (e *UniversalExecutor) wait() {
|
||||
e.destroyCgroup()
|
||||
}
|
||||
e.exitState = &ProcessState{Pid: 0, ExitCode: exitCode, Time: time.Now()}
|
||||
close(e.processExited)
|
||||
}
|
||||
|
||||
func (e *UniversalExecutor) Exit() error {
|
||||
|
||||
Reference in New Issue
Block a user