Browse Source

Merge pull request #618 from Zariel/fix-test-race

fix test race creating session
Chris Bannister 9 years ago
parent
commit
46dc090a34
1 changed files with 3 additions and 2 deletions
  1. 3 2
      cassandra_test.go

+ 3 - 2
cassandra_test.go

@@ -170,9 +170,10 @@ func TestCAS(t *testing.T) {
 		t.Skip("lightweight transactions not supported. Please use Cassandra >= 2.0")
 	}
 
-	session := createSession(t)
+	cluster := createCluster()
+	cluster.SerialConsistency = LocalSerial
+	session := createSessionFromCluster(cluster, t)
 	defer session.Close()
-	session.cfg.SerialConsistency = LocalSerial
 
 	if err := createTable(session, `CREATE TABLE gocql_test.cas_table (
 			title         varchar,