Skip to content

Commit 028f718

Browse files
committed
fix tests
1 parent e965e01 commit 028f718

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

connection_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ func TestPingMarkBadConnection(t *testing.T) {
163163
netConn: nc,
164164
buf: newBuffer(nc),
165165
maxAllowedPacket: defaultMaxAllowedPacket,
166+
closech: make(chan struct{}),
167+
cfg: NewConfig(),
166168
}
167169

168170
err := mc.Ping(context.Background())
@@ -184,8 +186,8 @@ func TestPingErrInvalidConn(t *testing.T) {
184186

185187
err := mc.Ping(context.Background())
186188

187-
if err != ErrInvalidConn {
188-
t.Errorf("expected ErrInvalidConn, got %#v", err)
189+
if err != nc.err {
190+
t.Errorf("expected %#v, got %#v", nc.err, err)
189191
}
190192
}
191193

0 commit comments

Comments
 (0)