[Travis][UnstableTests] Fixed unstable tests in travis (#5013)
* [Travis][UnstableTests] Fixed unstable tests in travis as seen in https://travis-ci.org/hashicorp/consul/jobs/460824602 * Fixed unstable tests in https://travis-ci.org/hashicorp/consul/jobs/460857687
This commit is contained in:
parent
0b4ed6ea6e
commit
61870be137
|
@ -24,7 +24,7 @@ func TestOperator_RaftGetConfiguration(t *testing.T) {
|
||||||
codec := rpcClient(t, s1)
|
codec := rpcClient(t, s1)
|
||||||
defer codec.Close()
|
defer codec.Close()
|
||||||
|
|
||||||
testrpc.WaitForLeader(t, s1.RPC, "dc1")
|
testrpc.WaitForTestAgent(t, s1.RPC, "dc1")
|
||||||
|
|
||||||
arg := structs.DCSpecificRequest{
|
arg := structs.DCSpecificRequest{
|
||||||
Datacenter: "dc1",
|
Datacenter: "dc1",
|
||||||
|
@ -71,7 +71,7 @@ func TestOperator_RaftGetConfiguration_ACLDeny(t *testing.T) {
|
||||||
codec := rpcClient(t, s1)
|
codec := rpcClient(t, s1)
|
||||||
defer codec.Close()
|
defer codec.Close()
|
||||||
|
|
||||||
testrpc.WaitForLeader(t, s1.RPC, "dc1")
|
testrpc.WaitForTestAgent(t, s1.RPC, "dc1")
|
||||||
|
|
||||||
// Make a request with no token to make sure it gets denied.
|
// Make a request with no token to make sure it gets denied.
|
||||||
arg := structs.DCSpecificRequest{
|
arg := structs.DCSpecificRequest{
|
||||||
|
@ -208,7 +208,7 @@ func TestOperator_RaftRemovePeerByAddress_ACLDeny(t *testing.T) {
|
||||||
codec := rpcClient(t, s1)
|
codec := rpcClient(t, s1)
|
||||||
defer codec.Close()
|
defer codec.Close()
|
||||||
|
|
||||||
testrpc.WaitForLeader(t, s1.RPC, "dc1")
|
testrpc.WaitForTestAgent(t, s1.RPC, "dc1")
|
||||||
|
|
||||||
// Make a request with no token to make sure it gets denied.
|
// Make a request with no token to make sure it gets denied.
|
||||||
arg := structs.RaftRemovePeerRequest{
|
arg := structs.RaftRemovePeerRequest{
|
||||||
|
|
|
@ -295,6 +295,7 @@ func TestServer_SessionTTL_Failover(t *testing.T) {
|
||||||
dir1, s1 := testServer(t)
|
dir1, s1 := testServer(t)
|
||||||
defer os.RemoveAll(dir1)
|
defer os.RemoveAll(dir1)
|
||||||
defer s1.Shutdown()
|
defer s1.Shutdown()
|
||||||
|
testrpc.WaitForTestAgent(t, s1.RPC, "dc1")
|
||||||
|
|
||||||
dir2, s2 := testServerDCBootstrap(t, "dc1", false)
|
dir2, s2 := testServerDCBootstrap(t, "dc1", false)
|
||||||
defer os.RemoveAll(dir2)
|
defer os.RemoveAll(dir2)
|
||||||
|
|
|
@ -20,6 +20,7 @@ func TestAPI_ACLCreateDestroy(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
c, s := makeACLClient(t)
|
c, s := makeACLClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
acl := c.ACL()
|
acl := c.ACL()
|
||||||
|
|
||||||
|
|
|
@ -670,7 +670,7 @@ func TestAPI_CatalogRegistration(t *testing.T) {
|
||||||
Status: HealthPassing,
|
Status: HealthPassing,
|
||||||
ServiceID: "redis1",
|
ServiceID: "redis1",
|
||||||
}
|
}
|
||||||
|
|
||||||
checks := HealthChecks{
|
checks := HealthChecks{
|
||||||
&HealthCheck{
|
&HealthCheck{
|
||||||
Node: "foobar",
|
Node: "foobar",
|
||||||
|
@ -848,6 +848,7 @@ func TestAPI_CatalogEnableTagOverride(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
catalog := c.Catalog()
|
catalog := c.Catalog()
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ func TestAPI_OperatorAutopilotGetSetConfiguration(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
operator := c.Operator()
|
operator := c.Operator()
|
||||||
config, err := operator.AutopilotGetConfiguration(nil)
|
config, err := operator.AutopilotGetConfiguration(nil)
|
||||||
|
|
|
@ -8,6 +8,7 @@ func TestAPI_StatusLeader(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
status := c.Status()
|
status := c.Status()
|
||||||
|
|
||||||
|
@ -24,6 +25,7 @@ func TestAPI_StatusPeers(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
status := c.Status()
|
status := c.Status()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue