فهرست منبع

Pool.Size() in simple pool returns the number of connections not the number of nodes

Ben Hood 11 سال پیش
والد
کامیت
cd88c627e7
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      cassandra_test.go

+ 4 - 2
cassandra_test.go

@@ -135,8 +135,10 @@ func TestRingDiscovery(t *testing.T) {
 		fmt.Printf("(Simple) Pooled peers: %+v\n", pooledPeers)
 	}
 
-	if *clusterSize != session.Pool.Size() {
-		t.Fatalf("Expected a cluster size of %d, but actual size was %d", *clusterSize, session.Pool.Size())
+	size := len(session.Pool.(*SimplePool).connPool)
+
+	if *clusterSize != size {
+		t.Fatalf("Expected a cluster size of %d, but actual size was %d", *clusterSize, size)
 	}
 
 	session.Close()