Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Jun 16, 2024
1 parent e965e01 commit 028f718
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ func TestPingMarkBadConnection(t *testing.T) {
netConn: nc,
buf: newBuffer(nc),
maxAllowedPacket: defaultMaxAllowedPacket,
closech: make(chan struct{}),
cfg: NewConfig(),
}

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

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)
}
}

Expand Down

0 comments on commit 028f718

Please sign in to comment.