diff options
author | Jakob Borg <jakob@nym.se> | 2014-03-22 17:10:26 +0100 |
---|---|---|
committer | Jakob Borg <jakob@nym.se> | 2014-03-22 17:10:26 +0100 |
commit | 168b23556a8c577d6f78b61bd12544b78d1b9c8b (patch) | |
tree | 3edba52f54bd5a7ea45e7ecc85730aed762c6016 | |
parent | 513100bb9227390ace03ce48767e61cb43ec9549 (diff) |
Improve TestClose
-rw-r--r-- | protocol/protocol_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocol/protocol_test.go b/protocol/protocol_test.go index 50a968ac78..d7ea489e72 100644 --- a/protocol/protocol_test.go +++ b/protocol/protocol_test.go @@ -174,23 +174,23 @@ func TestClose(t *testing.T) { c0.close(nil) - ok := c0.isClosed() - if !ok { + if !c0.isClosed() { + t.Fatal("Connection should be closed") + } + if !m0.isClosed() { t.Fatal("Connection should be closed") } // None of these should panic, some should return an error - ok = c0.ping() - if ok { + if c0.ping() { t.Error("Ping should not return true") } c0.Index("default", nil) c0.Index("default", nil) - _, err := c0.Request("default", "foo", 0, 0) - if err == nil { + if _, err := c0.Request("default", "foo", 0, 0); err == nil { t.Error("Request should return an error") } } |