diff --git a/agent/consul/prepared_query_endpoint_test.go b/agent/consul/prepared_query_endpoint_test.go index cf5346019b..16e332d6dd 100644 --- a/agent/consul/prepared_query_endpoint_test.go +++ b/agent/consul/prepared_query_endpoint_test.go @@ -2681,8 +2681,6 @@ func TestPreparedQuery_Wrapper(t *testing.T) { }) defer os.RemoveAll(dir1) defer s1.Shutdown() - codec1 := rpcClient(t, s1) - defer codec1.Close() dir2, s2 := testServerWithConfig(t, func(c *Config) { c.Datacenter = "dc2" @@ -2692,19 +2690,12 @@ func TestPreparedQuery_Wrapper(t *testing.T) { }) defer os.RemoveAll(dir2) defer s2.Shutdown() - codec2 := rpcClient(t, s2) - defer codec2.Close() testrpc.WaitForLeader(t, s1.RPC, "dc1") testrpc.WaitForLeader(t, s2.RPC, "dc2") // Try to WAN join. joinWAN(t, s2, s1) - retry.Run(t, func(r *retry.R) { - if got, want := len(s1.WANMembers()), 2; got != want { - r.Fatalf("got %d WAN members want %d", got, want) - } - }) // Try all the operations on a real server via the wrapper. wrapper := &queryServerWrapper{s1} diff --git a/agent/consul/txn_endpoint_test.go b/agent/consul/txn_endpoint_test.go index 5ac4ea513e..0a885446d5 100644 --- a/agent/consul/txn_endpoint_test.go +++ b/agent/consul/txn_endpoint_test.go @@ -162,8 +162,6 @@ func TestTxn_Apply_ACLDeny(t *testing.T) { }) defer os.RemoveAll(dir1) defer s1.Shutdown() - codec := rpcClient(t, s1) - defer codec.Close() testrpc.WaitForLeader(t, s1.RPC, "dc1") @@ -190,7 +188,7 @@ func TestTxn_Apply_ACLDeny(t *testing.T) { }, WriteRequest: structs.WriteRequest{Token: "root"}, } - if err := msgpackrpc.CallWithCodec(codec, "ACL.Apply", &arg, &id); err != nil { + if err := s1.RPC("ACL.Apply", &arg, &id); err != nil { t.Fatalf("err: %v", err) } } @@ -302,7 +300,7 @@ func TestTxn_Apply_ACLDeny(t *testing.T) { }, } var out structs.TxnResponse - if err := msgpackrpc.CallWithCodec(codec, "Txn.Apply", &arg, &out); err != nil { + if err := s1.RPC("Txn.Apply", &arg, &out); err != nil { t.Fatalf("err: %v", err) }