Skip to content

Commit

Permalink
close sessions after the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zariel committed Apr 13, 2015
1 parent ee7c326 commit 09a942b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cass1batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func TestSessionAPI(t *testing.T) {
}

s := NewSession(pool, cfg)
defer s.Close()

s.SetConsistency(All)
if s.cons != All {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 09a942b

Please sign in to comment.