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.
This commit is contained in:
Mark Rushakoff
2022-07-22 13:54:03 -04:00
parent d0a88e5d2d
commit 7b853328c1

View File

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