From 4afa034d6abdc2c1f71159768eeebc34b167d70c Mon Sep 17 00:00:00 2001 From: Sarah Adams Date: Fri, 12 Jul 2019 14:14:42 -0700 Subject: [PATCH] fix flaky test TestACLEndpoint_SecureIntroEndpoints_OnlyCreateLocalData (#6116) * fix test to write only to dc2 (typo) * fix retry behavior in existing test (was being used incorrectly) --- agent/consul/acl_endpoint_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agent/consul/acl_endpoint_test.go b/agent/consul/acl_endpoint_test.go index afd00e0c8..4acc1f8bb 100644 --- a/agent/consul/acl_endpoint_test.go +++ b/agent/consul/acl_endpoint_test.go @@ -480,14 +480,14 @@ func TestACLEndpoint_GetPolicy(t *testing.T) { retry.Run(t, func(r *retry.R) { if err := msgpackrpc.CallWithCodec(codec, "ACL.GetPolicy", &getR, &acls); err != nil { - t.Fatalf("err: %v", err) + r.Fatalf("err: %v", err) } if acls.Policy == nil { - t.Fatalf("Bad: %v", acls) + r.Fatalf("Bad: %v", acls) } if acls.TTL != 30*time.Second { - t.Fatalf("bad: %v", acls) + r.Fatalf("bad: %v", acls) } }) @@ -4339,7 +4339,7 @@ func TestACLEndpoint_SecureIntroEndpoints_OnlyCreateLocalData(t *testing.T) { } resp := structs.ACLToken{} - require.NoError(t, acl.Login(&req, &resp)) + require.NoError(t, acl2.Login(&req, &resp)) remoteToken = &resp // present in dc2