瀏覽代碼

Changed TestBatchLimit to test that the correct error is being returned.

Phillip Couto 11 年之前
父節點
當前提交
5eb6e0515f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cassandra_test.go

+ 1 - 1
cassandra_test.go

@@ -266,7 +266,7 @@ func TestBatchLimit(t *testing.T) {
 	for i := 0; i < 65537; i++ {
 		batch.Query(`INSERT INTO batch_table2 (id) VALUES (?)`, i)
 	}
-	if err := session.ExecuteBatch(batch); err == nil {
+	if err := session.ExecuteBatch(batch); err != ErrTooManyStmts {
 		t.Fatal("gocql attempted to execute a batch larger than the support limit of statements.")
 	}