diff --git a/cass1batch_test.go b/cass1batch_test.go index 7b9276aa0..35750a41d 100644 --- a/cass1batch_test.go +++ b/cass1batch_test.go @@ -12,6 +12,7 @@ func TestProto1BatchInsert(t *testing.T) { if err := session.Query("CREATE TABLE large (id int primary key)").Exec(); err != nil { t.Fatal("create table:", err) } + defer session.Close() begin := "BEGIN BATCH" end := "APPLY BATCH" diff --git a/session_test.go b/session_test.go index c9e3d2bf3..015d0f919 100644 --- a/session_test.go +++ b/session_test.go @@ -16,6 +16,7 @@ func TestSessionAPI(t *testing.T) { } s := NewSession(pool, cfg) + defer s.Close() s.SetConsistency(All) if s.cons != All { @@ -161,6 +162,8 @@ func TestBatchBasicAPI(t *testing.T) { } s := NewSession(pool, cfg) + defer s.Close() + b := s.NewBatch(UnloggedBatch) if b.Type != UnloggedBatch { t.Fatalf("expceted batch.Type to be '%v', got '%v'", UnloggedBatch, b.Type)