fix: shutdown

Carlos Alexandro Becker created

Change summary

testscript/script_test.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

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)
 				}
 			})