소스 검색

Cleaned the test code a bit

Ben Hood 11 년 전
부모
커밋
a9159bcb6d
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      cassandra_test.go

+ 1 - 5
cassandra_test.go

@@ -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 {