Commit f0a81441 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #7892 from ethereum-optimism/aj/external-stop

op-e2e: Wait for external clients to terminate after Kill()
parents 7eda9419 d9e44b56
...@@ -2,6 +2,7 @@ package op_e2e ...@@ -2,6 +2,7 @@ package op_e2e
import ( import (
"encoding/json" "encoding/json"
"errors"
"math/big" "math/big"
"os" "os"
"os/exec" "os/exec"
...@@ -51,6 +52,11 @@ func (eec *ExternalEthClient) Close() error { ...@@ -51,6 +52,11 @@ func (eec *ExternalEthClient) Close() error {
select { select {
case <-time.After(5 * time.Second): case <-time.After(5 * time.Second):
eec.Session.Kill() 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: case <-eec.Session.Exited:
} }
return nil 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