فهرست منبع

should close the session regardless of failure

Chris Bannister 9 سال پیش
والد
کامیت
1a66fe470d
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  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"