File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -157,23 +157,6 @@ func TestCleanCancel(t *testing.T) {
157157 }
158158}
159159
160- func TestPingMarkBadConnection (t * testing.T ) {
161- nc := badConnection {err : errors .New ("boom" )}
162- mc := & mysqlConn {
163- netConn : nc ,
164- buf : newBuffer (nc ),
165- maxAllowedPacket : defaultMaxAllowedPacket ,
166- closech : make (chan struct {}),
167- cfg : NewConfig (),
168- }
169-
170- err := mc .Ping (context .Background ())
171-
172- if ! errors .Is (err , nc .err ) {
173- t .Errorf ("expected %v, got %#v" , nc .err , err )
174- }
175- }
176-
177160func TestPingErrInvalidConn (t * testing.T ) {
178161 nc := badConnection {err : errors .New ("failed to write" ), n : 10 }
179162 mc := & mysqlConn {
@@ -186,7 +169,7 @@ func TestPingErrInvalidConn(t *testing.T) {
186169
187170 err := mc .Ping (context .Background ())
188171
189- if ! errors . Is ( err , nc .err ) {
172+ if err != nc .err {
190173 t .Errorf ("expected %v, got %#v" , nc .err , err )
191174 }
192175}
You can’t perform that action at this time.
0 commit comments