From 2a2bc74d99756b4dbd002f60bd7f05091413cce4 Mon Sep 17 00:00:00 2001 From: Kaspar Birk Date: Wed, 3 Aug 2022 10:51:20 +0200 Subject: [PATCH] updated test --- middleware_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/middleware_test.go b/middleware_test.go index 850e9af..3ff7107 100644 --- a/middleware_test.go +++ b/middleware_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "net/http" "testing" + "time" ) func TestMiddleware(t *testing.T) { @@ -23,6 +24,7 @@ func TestMiddleware(t *testing.T) { { path: "/", handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(2 * time.Second) w.WriteHeader(http.StatusOK) fmt.Fprint(w, "hello world") }),