fix tests
diff --git a/connection_test.go b/connection_test.go
index c59cb61..6f8d2a6 100644
--- a/connection_test.go
+++ b/connection_test.go
@@ -163,6 +163,8 @@
netConn: nc,
buf: newBuffer(nc),
maxAllowedPacket: defaultMaxAllowedPacket,
+ closech: make(chan struct{}),
+ cfg: NewConfig(),
}
err := mc.Ping(context.Background())
@@ -184,8 +186,8 @@
err := mc.Ping(context.Background())
- if err != ErrInvalidConn {
- t.Errorf("expected ErrInvalidConn, got %#v", err)
+ if err != nc.err {
+ t.Errorf("expected %#v, got %#v", nc.err, err)
}
}