From 2e81828b1983f4b3dbcd5f23afd7345fd48a06e2 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 30 Apr 2024 18:33:51 +0900 Subject: [PATCH] unify short name for mysqlConn in connection_test --- connection_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/connection_test.go b/connection_test.go index 98c985ae1..c59cb6176 100644 --- a/connection_test.go +++ b/connection_test.go @@ -117,8 +117,8 @@ func TestInterpolateParamsUint64(t *testing.T) { func TestCheckNamedValue(t *testing.T) { value := driver.NamedValue{Value: ^uint64(0)} - x := &mysqlConn{} - err := x.CheckNamedValue(&value) + mc := &mysqlConn{} + err := mc.CheckNamedValue(&value) if err != nil { t.Fatal("uint64 high-bit not convertible", err) @@ -159,13 +159,13 @@ func TestCleanCancel(t *testing.T) { func TestPingMarkBadConnection(t *testing.T) { nc := badConnection{err: errors.New("boom")} - ms := &mysqlConn{ + mc := &mysqlConn{ netConn: nc, buf: newBuffer(nc), maxAllowedPacket: defaultMaxAllowedPacket, } - err := ms.Ping(context.Background()) + err := mc.Ping(context.Background()) if err != driver.ErrBadConn { t.Errorf("expected driver.ErrBadConn, got %#v", err) @@ -174,7 +174,7 @@ func TestPingMarkBadConnection(t *testing.T) { func TestPingErrInvalidConn(t *testing.T) { nc := badConnection{err: errors.New("failed to write"), n: 10} - ms := &mysqlConn{ + mc := &mysqlConn{ netConn: nc, buf: newBuffer(nc), maxAllowedPacket: defaultMaxAllowedPacket, @@ -182,7 +182,7 @@ func TestPingErrInvalidConn(t *testing.T) { cfg: NewConfig(), } - err := ms.Ping(context.Background()) + err := mc.Ping(context.Background()) if err != ErrInvalidConn { t.Errorf("expected ErrInvalidConn, got %#v", err)