Browse Source

allow the cluster time to settle on new schema version

Chris Bannister 10 years ago
parent
commit
37a94fe377
1 changed files with 6 additions and 0 deletions
  1. 6 0
      cassandra_test.go

+ 6 - 0
cassandra_test.go

@@ -116,6 +116,12 @@ func createKeyspace(tb testing.TB, cluster *ClusterConfig, keyspace string) {
 		tb.Fatal(err)
 	}
 
+	// the schema version might be out of data between 2 nodes, so wait for the
+	// cluster to settle.
+	// TODO(zariel): use events here to know when the cluster has resolved to the
+	// new schema version
+	time.Sleep(5 * time.Millisecond)
+
 	tb.Logf("Created keyspace %s", keyspace)
 }