diff options
author | 2022-01-05 21:20:32 +0800 | |
---|---|---|
committer | 2022-01-05 05:20:32 -0800 | |
commit | 39a99a5bbe363a921dc3307c8b49876d12d538f7 (patch) | |
tree | 3dc97f3b6b846bc17f924e6b6af989532513d2d3 | |
parent | 7ee128a53da7ca1ee512422b56f31d4a24ed7b8b (diff) | |
download | coredns-39a99a5bbe363a921dc3307c8b49876d12d538f7.tar.gz coredns-39a99a5bbe363a921dc3307c8b49876d12d538f7.tar.zst coredns-39a99a5bbe363a921dc3307c8b49876d12d538f7.zip |
fix goroutine leaks in TestRoute53 (#5070)
Signed-off-by: Ting Yuan <yuanting@ict.ac.cn>
-rw-r--r-- | plugin/route53/route53_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |