Ver código fonte

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

Phillip Couto 11 anos atrás
pai
commit
5eb6e0515f
1 arquivos alterados com 1 adições e 1 exclusões
  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.")
 	}