@@ -70,10 +70,8 @@ def check_grid_idx():
7070
7171@pytest .mark .parametrize ("key,grid_idx" , [(1 , 1 ), (2 , 2 ), (3 , 3 ), (4 , 1 ), (5 , 1 ), (6 , 2 ), (11 , 1 ), (13 , 1 ), (19 , 1 )])
7272@pytest .mark .parametrize ("backups" , [0 , 1 , 2 , 3 ])
73- def test_cache_operation_on_primitive_key_routes_request_to_primary_node (
74- request , key , grid_idx , backups , client_partition_aware ):
75-
76- cache = client_partition_aware .get_or_create_cache ({
73+ def test_cache_operation_on_primitive_key_routes_request_to_primary_node (request , key , grid_idx , backups , client ):
74+ cache = client .get_or_create_cache ({
7775 PROP_NAME : request .node .name + str (backups ),
7876 PROP_BACKUPS_NUMBER : backups ,
7977 })
@@ -132,8 +130,7 @@ def test_cache_operation_on_complex_key_routes_request_to_primary_node():
132130
133131@pytest .mark .parametrize ("key,grid_idx" , [(1 , 2 ), (2 , 1 ), (3 , 1 ), (4 , 2 ), (5 , 2 ), (6 , 3 )])
134132@pytest .mark .skip (reason = "GG-25823: Custom key objects are not supported yet" )
135- def test_cache_operation_on_custom_affinity_key_routes_request_to_primary_node (
136- request , client_partition_aware , key , grid_idx ):
133+ def test_cache_operation_on_custom_affinity_key_routes_request_to_primary_node (request , client , key , grid_idx ):
137134 class AffinityTestType1 (
138135 metaclass = GenericObjectMeta ,
139136 type_name = 'AffinityTestType1' ,
@@ -153,7 +150,7 @@ class AffinityTestType1(
153150 },
154151 ],
155152 }
156- cache = client_partition_aware .create_cache (cache_config )
153+ cache = client .create_cache (cache_config )
157154
158155 # noinspection PyArgumentList
159156 key_obj = AffinityTestType1 (
@@ -167,17 +164,18 @@ class AffinityTestType1(
167164 assert requests .pop () == grid_idx
168165
169166
170- def test_cache_operation_routed_to_new_cluster_node (request , start_ignite_server , start_client ):
171- client = start_client (partition_aware = True )
172- client .connect ([("127.0.0.1" , 10801 ), ("127.0.0.1" , 10802 ), ("127.0.0.1" , 10803 ), ("127.0.0.1" , 10804 )])
173- cache = client .get_or_create_cache (request .node .name )
167+ def test_cache_operation_routed_to_new_cluster_node (request , client_not_connected ):
168+ client_not_connected .connect (
169+ [("127.0.0.1" , 10801 ), ("127.0.0.1" , 10802 ), ("127.0.0.1" , 10803 ), ("127.0.0.1" , 10804 )]
170+ )
171+ cache = client_not_connected .get_or_create_cache (request .node .name )
174172 key = 12
175173 wait_for_affinity_distribution (cache , key , 3 )
176174 cache .put (key , key )
177175 cache .put (key , key )
178176 assert requests .pop () == 3
179177
180- srv = start_ignite_server ( 4 )
178+ srv = start_ignite ( idx = 4 )
181179 try :
182180 # Wait for rebalance and partition map exchange
183181 wait_for_affinity_distribution (cache , key , 4 )
@@ -190,8 +188,8 @@ def test_cache_operation_routed_to_new_cluster_node(request, start_ignite_server
190188 kill_process_tree (srv .pid )
191189
192190
193- def test_replicated_cache_operation_routed_to_random_node (request , client_partition_aware ):
194- cache = client_partition_aware .get_or_create_cache ({
191+ def test_replicated_cache_operation_routed_to_random_node (request , client ):
192+ cache = client .get_or_create_cache ({
195193 PROP_NAME : request .node .name ,
196194 PROP_CACHE_MODE : CacheMode .REPLICATED ,
197195 })
0 commit comments