From 62c6ce7e43e2f6bb6b0fb665868f10dd2ec231dc Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 24 May 2023 13:18:37 +0000 Subject: [PATCH] fix: shutdown --- testscript/script_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) } })