5
5
6
6
from tests .integration import use_cluster
7
7
from cassandra .cluster import Cluster , TwistedConnection
8
- from cassandra .connection import SniEndPointFactory
9
8
from cassandra .io .asyncorereactor import AsyncoreConnection
10
9
from cassandra .io .libevreactor import LibevConnection
11
10
from cassandra .io .geventreactor import GeventConnection
@@ -45,21 +44,17 @@ def start_cluster_with_proxy(self):
45
44
ccm_cluster .sni_proxy_listen_port = listen_port
46
45
ccm_cluster ._update_config ()
47
46
48
- config_data_yaml , config_path_yaml = create_cloud_config (ccm_cluster .get_path (), listen_port )
49
-
50
- endpoint_factory = SniEndPointFactory (listen_address , port = int (listen_port ),
51
- node_domain = "cluster-id.scylla.com" )
52
-
53
- return config_data_yaml , config_path_yaml , endpoint_factory
47
+ config_data_yaml , config_path_yaml = create_cloud_config (ccm_cluster .get_path (),
48
+ port = listen_port , address = listen_address )
49
+ return config_data_yaml , config_path_yaml
54
50
55
51
def test_1_node_cluster (self ):
56
52
self .ccm_cluster = use_cluster ("sni_proxy" , [1 ], start = False )
57
- config_data_yaml , config_path_yaml , endpoint_factory = self .start_cluster_with_proxy ()
53
+ config_data_yaml , config_path_yaml = self .start_cluster_with_proxy ()
58
54
59
55
for config in [config_path_yaml , config_data_yaml ]:
60
56
for connection_class in supported_connection_classes :
61
- cluster = Cluster (scylla_cloud = config , connection_class = connection_class ,
62
- endpoint_factory = endpoint_factory )
57
+ cluster = Cluster (scylla_cloud = config , connection_class = connection_class )
63
58
with cluster .connect () as session :
64
59
res = session .execute ("SELECT * FROM system.local" )
65
60
assert res .all ()
@@ -69,12 +64,11 @@ def test_1_node_cluster(self):
69
64
70
65
def test_3_node_cluster (self ):
71
66
self .ccm_cluster = use_cluster ("sni_proxy" , [3 ], start = False )
72
- config_data_yaml , config_path_yaml , endpoint_factory = self .start_cluster_with_proxy ()
67
+ config_data_yaml , config_path_yaml = self .start_cluster_with_proxy ()
73
68
74
69
for config in [config_path_yaml , config_data_yaml ]:
75
70
for connection_class in supported_connection_classes :
76
- cluster = Cluster (scylla_cloud = config , connection_class = connection_class ,
77
- endpoint_factory = endpoint_factory )
71
+ cluster = Cluster (scylla_cloud = config , connection_class = connection_class )
78
72
with cluster .connect () as session :
79
73
res = session .execute ("SELECT * FROM system.local" )
80
74
assert res .all ()
0 commit comments