Commit d9e44b56 authored by Adrian Sutton's avatar Adrian Sutton

op-e2e: Wait for external clients to terminate after Kill()

Otherwise the client may write to a directory the test tries to delete causing failures.
parent bb83c60c
......@@ -2,6 +2,7 @@ package op_e2e
import (
"encoding/json"
"errors"
"math/big"
"os"
"os/exec"
......@@ -51,6 +52,11 @@ func (eec *ExternalEthClient) Close() error {
select {
case <-time.After(5 * time.Second):
eec.Session.Kill()
select {
case <-time.After(30 * time.Second):
return errors.New("external client failed to terminate")
case <-eec.Session.Exited:
}
case <-eec.Session.Exited:
}
return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment