Skip long rpc/client 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/client from about 28s to about 3.6s.
This commit is contained in:
Mark Rushakoff
2022-07-22 11:17:04 -04:00
parent af1f81072d
commit 2cdf1f0806
3 changed files with 48 additions and 0 deletions
+8
View File
@@ -18,6 +18,10 @@ import (
)
func TestHTTPSimple(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -68,6 +72,10 @@ func TestHTTPSimple(t *testing.T) {
}
func TestHTTPBatching(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()