Explorar o código

should close the session regardless of failure

Chris Bannister %!s(int64=9) %!d(string=hai) anos
pai
achega
1a66fe470d
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      cass1batch_test.go

+ 2 - 1
cass1batch_test.go

@@ -9,10 +9,11 @@ import (
 
 func TestProto1BatchInsert(t *testing.T) {
 	session := createSession(t)
+	defer session.Close()
+
 	if err := createTable(session, "CREATE TABLE gocql_test.large (id int primary key)"); err != nil {
 		t.Fatal(err)
 	}
-	defer session.Close()
 
 	begin := "BEGIN BATCH"
 	end := "APPLY BATCH"