diff --git a/api/api_test.go b/api/api_test.go index 56f764d83..5b7f557ca 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -50,6 +50,11 @@ func makeClientWithConfig( t *testing.T, cb1 configCallback, cb2 testutil.ServerConfigCallback) (*Client, *testutil.TestServer) { + // Skip test when -short flag provided; any tests that create a test + // server will take at least 100ms which is undesirable for -short + if testing.Short() { + t.Skip("too slow for testing.Short") + } // Make client config conf := DefaultConfig() diff --git a/api/watch/funcs_test.go b/api/watch/funcs_test.go index 10c67da4e..1c23654f0 100644 --- a/api/watch/funcs_test.go +++ b/api/watch/funcs_test.go @@ -24,6 +24,12 @@ import ( ) func makeClient(t *testing.T) (*api.Client, *testutil.TestServer) { + // Skip test when -short flag provided; any tests that create a test server + // will take at least 100ms which is undesirable for -short + if testing.Short() { + t.Skip("too slow for testing.Short") + } + // Make client config conf := api.DefaultConfig()