Skip to content

Commit 91e9b08

Browse files
authored
Merge pull request #785 from docker/e2e
fix(e2e): send SIGINT on teardown to prevent orphan processes
2 parents e271446 + 1b0b755 commit 91e9b08

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

e2e/e2e_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ func run(m *testing.M) int {
8383
defer cancel()
8484

8585
server := exec.CommandContext(ctx, serverBin)
86+
// TODO: os.Interrupt is not supported on Windows. When Windows e2e
87+
// tests are added, use a platform-specific shutdown mechanism.
88+
server.Cancel = func() error {
89+
return server.Process.Signal(os.Interrupt)
90+
}
8691
server.Dir = root
8792
server.Env = append(os.Environ(),
8893
"MODEL_RUNNER_PORT="+strconv.Itoa(port),

0 commit comments

Comments
 (0)