|
|
@@ -30,7 +30,6 @@ var (
|
|
|
clusterSize = flag.Int("clusterSize", 1, "the expected size of the cluster")
|
|
|
flagRetry = flag.Int("retries", 5, "number of times to retry queries")
|
|
|
flagAutoWait = flag.Duration("autowait", 1000*time.Millisecond, "time to wait for autodiscovery to fill the hosts poll")
|
|
|
- //flagAutoFreq = flag.Duration("autofreq", 1000*time.Millisecond, "frequency for autodiscovery to discover new hosts")
|
|
|
clusterHosts []string
|
|
|
)
|
|
|
|
|
|
@@ -100,10 +99,8 @@ func createSession(tb testing.TB) *Session {
|
|
|
return session
|
|
|
}
|
|
|
|
|
|
+//TestRingDiscovery makes sure that you can autodiscover other cluster members when you seed a cluster config with just one node
|
|
|
func TestRingDiscovery(t *testing.T) {
|
|
|
- // if *flagProto == 1 {
|
|
|
- // t.Skip("ring autodiscovery not supported. Please use Cassandra >= 2.0")
|
|
|
- // }
|
|
|
|
|
|
cluster := NewCluster(clusterHosts[0])
|
|
|
cluster.ProtoVersion = *flagProto
|
|
|
@@ -112,7 +109,6 @@ func TestRingDiscovery(t *testing.T) {
|
|
|
cluster.Consistency = Quorum
|
|
|
cluster.RetryPolicy.NumRetries = *flagRetry
|
|
|
cluster.DiscoverHosts = true
|
|
|
- //cluster.Discovery = DiscoveryConfig{Sleep: *flagAutoFreq}
|
|
|
|
|
|
session, err := cluster.CreateSession()
|
|
|
if err != nil {
|