File tree 1 file changed +1
-18
lines changed
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) {
157
157
}
158
158
}
159
159
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
-
177
160
func TestPingErrInvalidConn (t * testing.T ) {
178
161
nc := badConnection {err : errors .New ("failed to write" ), n : 10 }
179
162
mc := & mysqlConn {
@@ -186,7 +169,7 @@ func TestPingErrInvalidConn(t *testing.T) {
186
169
187
170
err := mc .Ping (context .Background ())
188
171
189
- if ! errors . Is ( err , nc .err ) {
172
+ if err != nc .err {
190
173
t .Errorf ("expected %v, got %#v" , nc .err , err )
191
174
}
192
175
}
You can’t perform that action at this time.
0 commit comments