diff --git a/cmd/util_test.go b/cmd/util_test.go index 605197b5382..09514314187 100644 --- a/cmd/util_test.go +++ b/cmd/util_test.go @@ -57,6 +57,7 @@ func (s *utilsSuite) TestProxyFields(c *check.C) { } func (s *utilsSuite) TestVerifyPdEndpoint(c *check.C) { + defer testleak.AfterTest(c)() // empty URL. url := "" c.Assert(verifyPdEndpoint(url, false), check.ErrorMatches, ".*PD endpoint should be a valid http or https URL.*")