Explorar o código

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

Phillip Couto %!s(int64=11) %!d(string=hai) anos
pai
achega
5eb6e0515f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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.")
 	}