From 9918b6e89f59c168f7c2cbb9cf0f958ea8283fda Mon Sep 17 00:00:00 2001 From: Mark Rushakoff Date: Fri, 22 Jul 2022 11:59:12 -0400 Subject: [PATCH] Skip long light/provider/http tests in -short mode I added checks against testing.Short for tests that took longer than about one second on my machine. Running with -short reduces the test time of light/provider/http from about 20s to about 0.3s. --- light/provider/http/http_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/light/provider/http/http_test.go b/light/provider/http/http_test.go index cb443caaf..3dc425c7a 100644 --- a/light/provider/http/http_test.go +++ b/light/provider/http/http_test.go @@ -33,6 +33,10 @@ func TestNewProvider(t *testing.T) { } func TestProvider(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode") + } + ctx, cancel := context.WithCancel(context.Background()) defer cancel() cfg, err := rpctest.CreateConfig(t, t.Name())