From f320b5803ef8fda3d0371a2a6de26ee9f66d2d22 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Tue, 1 Dec 2020 16:20:07 +0300 Subject: GHA update --- plugins/static/tests/static_plugin_test.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'plugins/static') diff --git a/plugins/static/tests/static_plugin_test.go b/plugins/static/tests/static_plugin_test.go index a9cb1fd1..d0403160 100644 --- a/plugins/static/tests/static_plugin_test.go +++ b/plugins/static/tests/static_plugin_test.go @@ -57,8 +57,9 @@ func TestStaticPlugin(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) + tt := time.NewTimer(time.Second * 10) + go func() { - tt := time.NewTimer(time.Second * 10) defer wg.Done() for { select { @@ -85,6 +86,7 @@ func TestStaticPlugin(t *testing.T) { } }() + time.Sleep(time.Second) t.Run("ServeSample", serveStaticSample) t.Run("StaticNotForbid", staticNotForbid) t.Run("StaticHeaders", staticHeaders) @@ -163,8 +165,9 @@ func TestStaticDisabled(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) + tt := time.NewTimer(time.Second * 10) + go func() { - tt := time.NewTimer(time.Second * 10) defer wg.Done() for { select { @@ -191,6 +194,7 @@ func TestStaticDisabled(t *testing.T) { } }() + time.Sleep(time.Second) t.Run("StaticDisabled", staticDisabled) wg.Wait() } @@ -234,8 +238,9 @@ func TestStaticFilesDisabled(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) + tt := time.NewTimer(time.Second * 10) + go func() { - tt := time.NewTimer(time.Second * 10) defer wg.Done() for { select { @@ -262,6 +267,7 @@ func TestStaticFilesDisabled(t *testing.T) { } }() + time.Sleep(time.Second) t.Run("StaticFilesDisabled", staticFilesDisabled) wg.Wait() } @@ -314,8 +320,9 @@ func TestStaticFilesForbid(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) + tt := time.NewTimer(time.Second * 10) + go func() { - tt := time.NewTimer(time.Second * 10) defer wg.Done() for { select { @@ -342,6 +349,7 @@ func TestStaticFilesForbid(t *testing.T) { } }() + time.Sleep(time.Second) t.Run("StaticTestFilesDir", staticTestFilesDir) t.Run("StaticNotFound", staticNotFound) t.Run("StaticFilesForbid", staticFilesForbid) -- cgit v1.2.3