瀏覽代碼

allow the cluster time to settle on new schema version

Chris Bannister 10 年之前
父節點
當前提交
37a94fe377
共有 1 個文件被更改,包括 6 次插入0 次删除
  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)
 }