diff --git a/testscript/script_test.go b/testscript/script_test.go index d474ff84247617a44b5d0488c6fe5445e4bd0e96..2e3a20375c5d262aefe2fd75fce10f73372e8517 100644 --- a/testscript/script_test.go +++ b/testscript/script_test.go @@ -113,7 +113,9 @@ func TestScript(t *testing.T) { } }() e.Defer(func() { - if err := srv.Shutdown(context.Background()); err != nil { + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + if err := srv.Shutdown(ctx); err != nil { e.T().Fatal(err) } })