From 75b254c8ebf21483f591900638e7a37851764d85 Mon Sep 17 00:00:00 2001 From: lysu Date: Tue, 7 Jul 2020 17:37:54 +0800 Subject: [PATCH] test: make TestDispatchClientProtocol41 stable (#18414) --- server/conn_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/conn_test.go b/server/conn_test.go index f5be261c8d541..7beb523c85103 100644 --- a/server/conn_test.go +++ b/server/conn_test.go @@ -428,10 +428,11 @@ func (ts *ConnTestSuite) testDispatch(c *C, inputs []dispatchInput, capability u var outBuffer bytes.Buffer tidbdrv := NewTiDBDriver(ts.store) cfg := config.NewConfig() - cfg.Port = 4005 + cfg.Port = genPort() cfg.Status.ReportStatus = false server, err := NewServer(cfg, tidbdrv) c.Assert(err, IsNil) + defer server.Close() cc := &clientConn{ connectionID: 1,