api: run tests in parallel

This commit is contained in:
Ryan Uber 2015-05-08 10:27:24 -07:00
parent 2d2fc71e0d
commit 234466b412
11 changed files with 62 additions and 0 deletions

View File

@ -13,6 +13,7 @@ func init() {
}
func TestACL_CreateDestroy(t *testing.T) {
t.Parallel()
if CONSUL_ROOT == "" {
t.SkipNow()
}
@ -61,6 +62,7 @@ func TestACL_CreateDestroy(t *testing.T) {
}
func TestACL_CloneDestroy(t *testing.T) {
t.Parallel()
if CONSUL_ROOT == "" {
t.SkipNow()
}
@ -94,6 +96,7 @@ func TestACL_CloneDestroy(t *testing.T) {
}
func TestACL_Info(t *testing.T) {
t.Parallel()
if CONSUL_ROOT == "" {
t.SkipNow()
}
@ -121,6 +124,7 @@ func TestACL_Info(t *testing.T) {
}
func TestACL_List(t *testing.T) {
t.Parallel()
if CONSUL_ROOT == "" {
t.SkipNow()
}

View File

@ -6,6 +6,7 @@ import (
)
func TestAgent_Self(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -23,6 +24,7 @@ func TestAgent_Self(t *testing.T) {
}
func TestAgent_Members(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -39,6 +41,7 @@ func TestAgent_Members(t *testing.T) {
}
func TestAgent_Services(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -78,6 +81,7 @@ func TestAgent_Services(t *testing.T) {
}
func TestAgent_ServiceAddress(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -124,6 +128,7 @@ func TestAgent_ServiceAddress(t *testing.T) {
}
func TestAgent_Services_MultipleChecks(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -167,6 +172,7 @@ func TestAgent_Services_MultipleChecks(t *testing.T) {
}
func TestAgent_SetTTLStatus(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -207,6 +213,7 @@ func TestAgent_SetTTLStatus(t *testing.T) {
}
func TestAgent_Checks(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -234,6 +241,7 @@ func TestAgent_Checks(t *testing.T) {
}
func TestAgent_Checks_serviceBound(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -272,6 +280,7 @@ func TestAgent_Checks_serviceBound(t *testing.T) {
}
func TestAgent_Join(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -291,6 +300,7 @@ func TestAgent_Join(t *testing.T) {
}
func TestAgent_ForceLeave(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -304,6 +314,7 @@ func TestAgent_ForceLeave(t *testing.T) {
}
func TestServiceMaintenance(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -358,6 +369,7 @@ func TestServiceMaintenance(t *testing.T) {
}
func TestNodeMaintenance(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()

View File

@ -59,6 +59,7 @@ func testKey() string {
}
func TestDefaultConfig_env(t *testing.T) {
t.Parallel()
addr := "1.2.3.4:5678"
token := "abcd1234"
auth := "username:password"
@ -104,6 +105,7 @@ func TestDefaultConfig_env(t *testing.T) {
}
func TestSetQueryOptions(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -139,6 +141,7 @@ func TestSetQueryOptions(t *testing.T) {
}
func TestSetWriteOptions(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -158,6 +161,7 @@ func TestSetWriteOptions(t *testing.T) {
}
func TestRequestToHTTP(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -180,6 +184,7 @@ func TestRequestToHTTP(t *testing.T) {
}
func TestParseQueryMeta(t *testing.T) {
t.Parallel()
resp := &http.Response{
Header: make(map[string][]string),
}
@ -204,6 +209,7 @@ func TestParseQueryMeta(t *testing.T) {
}
func TestAPI_UnixSocket(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
t.SkipNow()
}

View File

@ -8,6 +8,7 @@ import (
)
func TestCatalog_Datacenters(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -30,6 +31,7 @@ func TestCatalog_Datacenters(t *testing.T) {
}
func TestCatalog_Nodes(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -56,6 +58,7 @@ func TestCatalog_Nodes(t *testing.T) {
}
func TestCatalog_Services(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -82,6 +85,7 @@ func TestCatalog_Services(t *testing.T) {
}
func TestCatalog_Service(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -108,6 +112,7 @@ func TestCatalog_Service(t *testing.T) {
}
func TestCatalog_Node(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -134,6 +139,7 @@ func TestCatalog_Node(t *testing.T) {
}
func TestCatalog_Registration(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()

View File

@ -5,6 +5,7 @@ import (
)
func TestEvent_FireList(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()

View File

@ -8,6 +8,7 @@ import (
)
func TestHealth_Node(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -38,6 +39,7 @@ func TestHealth_Node(t *testing.T) {
}
func TestHealth_Checks(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -74,6 +76,7 @@ func TestHealth_Checks(t *testing.T) {
}
func TestHealth_Service(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -98,6 +101,7 @@ func TestHealth_Service(t *testing.T) {
}
func TestHealth_State(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()

View File

@ -8,6 +8,7 @@ import (
)
func TestClientPutGetDelete(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -64,6 +65,7 @@ func TestClientPutGetDelete(t *testing.T) {
}
func TestClient_List_DeleteRecurse(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -118,6 +120,7 @@ func TestClient_List_DeleteRecurse(t *testing.T) {
}
func TestClient_DeleteCAS(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -163,6 +166,7 @@ func TestClient_DeleteCAS(t *testing.T) {
}
func TestClient_CAS(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -210,6 +214,7 @@ func TestClient_CAS(t *testing.T) {
}
func TestClient_WatchGet(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -261,6 +266,7 @@ func TestClient_WatchGet(t *testing.T) {
}
func TestClient_WatchList(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -314,6 +320,7 @@ func TestClient_WatchList(t *testing.T) {
}
func TestClient_Keys_DeleteRecurse(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -363,6 +370,7 @@ func TestClient_Keys_DeleteRecurse(t *testing.T) {
}
func TestClient_AcquireRelease(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()

View File

@ -8,6 +8,7 @@ import (
)
func TestLock_LockUnlock(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -65,6 +66,7 @@ func TestLock_LockUnlock(t *testing.T) {
}
func TestLock_ForceInvalidate(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -99,6 +101,7 @@ func TestLock_ForceInvalidate(t *testing.T) {
}
func TestLock_DeleteKey(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -132,6 +135,7 @@ func TestLock_DeleteKey(t *testing.T) {
}
func TestLock_Contend(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -184,6 +188,7 @@ func TestLock_Contend(t *testing.T) {
}
func TestLock_Destroy(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -252,6 +257,7 @@ func TestLock_Destroy(t *testing.T) {
}
func TestLock_Conflict(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -289,6 +295,7 @@ func TestLock_Conflict(t *testing.T) {
}
func TestLock_ReclaimLock(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()

View File

@ -8,6 +8,7 @@ import (
)
func TestSemaphore_AcquireRelease(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -65,6 +66,7 @@ func TestSemaphore_AcquireRelease(t *testing.T) {
}
func TestSemaphore_ForceInvalidate(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -99,6 +101,7 @@ func TestSemaphore_ForceInvalidate(t *testing.T) {
}
func TestSemaphore_DeleteKey(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -132,6 +135,7 @@ func TestSemaphore_DeleteKey(t *testing.T) {
}
func TestSemaphore_Contend(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -184,6 +188,7 @@ func TestSemaphore_Contend(t *testing.T) {
}
func TestSemaphore_BadLimit(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -214,6 +219,7 @@ func TestSemaphore_BadLimit(t *testing.T) {
}
func TestSemaphore_Destroy(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -269,6 +275,7 @@ func TestSemaphore_Destroy(t *testing.T) {
}
func TestSemaphore_Conflict(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()

View File

@ -5,6 +5,7 @@ import (
)
func TestSession_CreateDestroy(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -34,6 +35,7 @@ func TestSession_CreateDestroy(t *testing.T) {
}
func TestSession_CreateRenewDestroy(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -84,6 +86,7 @@ func TestSession_CreateRenewDestroy(t *testing.T) {
}
func TestSession_Info(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -137,6 +140,7 @@ func TestSession_Info(t *testing.T) {
}
func TestSession_Node(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -171,6 +175,7 @@ func TestSession_Node(t *testing.T) {
}
func TestSession_List(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()

View File

@ -5,6 +5,7 @@ import (
)
func TestStatusLeader(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()
@ -20,6 +21,7 @@ func TestStatusLeader(t *testing.T) {
}
func TestStatusPeers(t *testing.T) {
t.Parallel()
c, s := makeClient(t)
defer s.Stop()