From 7b853328c1ca4b032a94332abc00718571753be3 Mon Sep 17 00:00:00 2001 From: Mark Rushakoff Date: Fri, 22 Jul 2022 13:54:03 -0400 Subject: [PATCH] Skip long rpc/jsonrpc 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 rpc/jsonrpc from about 8.3s to about 2.3s. --- rpc/jsonrpc/jsonrpc_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpc/jsonrpc/jsonrpc_test.go b/rpc/jsonrpc/jsonrpc_test.go index 236db9b32..0586e3019 100644 --- a/rpc/jsonrpc/jsonrpc_test.go +++ b/rpc/jsonrpc/jsonrpc_test.go @@ -340,6 +340,10 @@ func TestRPC(t *testing.T) { } }) t.Run("WSClientPingPong", func(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode") + } + // TestWSClientPingPong checks that a client & server exchange pings // & pongs so connection stays alive. t.Cleanup(leaktest.CheckTimeout(t, 4*time.Second))