fix goroutine leaks in TestRoute53 (#5070)

Signed-off-by: Ting Yuan <yuanting@ict.ac.cn>
This commit is contained in:
Ting Yuan
2022-01-05 21:20:32 +08:00
committed by GitHub
parent 7ee128a53d
commit 39a99a5bbe

View File

@@ -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 {