From 39a99a5bbe363a921dc3307c8b49876d12d538f7 Mon Sep 17 00:00:00 2001 From: Ting Yuan Date: Wed, 5 Jan 2022 21:20:32 +0800 Subject: [PATCH] fix goroutine leaks in TestRoute53 (#5070) Signed-off-by: Ting Yuan --- plugin/route53/route53_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/route53/route53_test.go b/plugin/route53/route53_test.go index 057313fa6..e408b29f2 100644 --- a/plugin/route53/route53_test.go +++ b/plugin/route53/route53_test.go @@ -77,7 +77,8 @@ func (fakeRoute53) ListResourceRecordSetsPagesWithContext(_ aws.Context, in *rou } func TestRoute53(t *testing.T) { - ctx := context.Background() + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() r, err := New(ctx, fakeRoute53{}, map[string][]string{"bad.": {"0987654321"}}, time.Minute) if err != nil {