anton-vinogradov commented on a change in pull request #8522:
URL: https://github.com/apache/ignite/pull/8522#discussion_r542427313



##########
File path: modules/ducktests/tests/ignitetest/tests/discovery_test.py
##########
@@ -88,99 +93,100 @@ def __init__(self, test_context):
 
     @cluster(num_nodes=MAX_CONTAINERS)
     @ignite_versions(str(DEV_BRANCH), str(LATEST))
-    @matrix(nodes_to_kill=[1, 2], failure_detection_timeout=[FAILURE_TIMEOUT],
-            load_type=[ClusterLoad.NONE, ClusterLoad.ATOMIC, 
ClusterLoad.TRANSACTIONAL])
-    def test_nodes_fail_not_sequential_tcp(self, ignite_version, 
nodes_to_kill, load_type, failure_detection_timeout):
+    @matrix(nodes_to_kill=[1, 2], load_type=[ClusterLoad.NONE, 
ClusterLoad.ATOMIC, ClusterLoad.TRANSACTIONAL])
+    def test_nodes_fail_not_sequential_tcp(self, ignite_version, 
nodes_to_kill, load_type):
         """
         Test nodes failure scenario with TcpDiscoverySpi not allowing nodes to 
fail in a row.
         """
         test_config = 
DiscoveryTestConfig(version=IgniteVersion(ignite_version), 
nodes_to_kill=nodes_to_kill,
-                                          
load_type=ClusterLoad.construct_from(load_type), sequential_failure=False,
-                                          
failure_detection_timeout=failure_detection_timeout)
+                                          
load_type=ClusterLoad.construct_from(load_type), sequential_failure=False)
 
         return self._perform_node_fail_scenario(test_config)
 
     @cluster(num_nodes=MAX_CONTAINERS)
     @ignite_versions(str(DEV_BRANCH), str(LATEST))
-    @matrix(load_type=[ClusterLoad.NONE, ClusterLoad.ATOMIC, 
ClusterLoad.TRANSACTIONAL],
-            failure_detection_timeout=[FAILURE_TIMEOUT])
-    def test_2_nodes_fail_sequential_tcp(self, ignite_version, load_type, 
failure_detection_timeout):
+    @matrix(load_type=[ClusterLoad.NONE, ClusterLoad.ATOMIC, 
ClusterLoad.TRANSACTIONAL])
+    def test_2_nodes_fail_sequential_tcp(self, ignite_version, load_type):
         """
         Test 2 nodes sequential failure scenario with TcpDiscoverySpi.
         """
         test_config = 
DiscoveryTestConfig(version=IgniteVersion(ignite_version), nodes_to_kill=2,
-                                          
load_type=ClusterLoad.construct_from(load_type), sequential_failure=True,
-                                          
failure_detection_timeout=failure_detection_timeout)
+                                          
load_type=ClusterLoad.construct_from(load_type), sequential_failure=True)
 
         return self._perform_node_fail_scenario(test_config)
 
     @cluster(num_nodes=MAX_CONTAINERS)
     @version_if(lambda version: version != V_2_8_0)  # ignite-zookeeper 
package is broken in 2.8.0
     @ignite_versions(str(DEV_BRANCH), str(LATEST))
-    @matrix(nodes_to_kill=[1, 2], failure_detection_timeout=[FAILURE_TIMEOUT],
-            load_type=[ClusterLoad.NONE, ClusterLoad.ATOMIC, 
ClusterLoad.TRANSACTIONAL])
-    def test_nodes_fail_not_sequential_zk(self, ignite_version, nodes_to_kill, 
load_type, failure_detection_timeout):
+    @matrix(nodes_to_kill=[1, 2], load_type=[ClusterLoad.NONE, 
ClusterLoad.ATOMIC, ClusterLoad.TRANSACTIONAL])
+    def test_nodes_fail_not_sequential_zk(self, ignite_version, nodes_to_kill, 
load_type):
         """
         Test node failure scenario with ZooKeeperSpi not allowing nodes to 
fail in a row.
         """
         test_config = 
DiscoveryTestConfig(version=IgniteVersion(ignite_version), 
nodes_to_kill=nodes_to_kill,
                                           
load_type=ClusterLoad.construct_from(load_type), sequential_failure=False,
-                                          with_zk=True, 
failure_detection_timeout=failure_detection_timeout)
+                                          with_zk=True)
 
         return self._perform_node_fail_scenario(test_config)
 
     @cluster(num_nodes=MAX_CONTAINERS)
     @version_if(lambda version: version != V_2_8_0)  # ignite-zookeeper 
package is broken in 2.8.0
     @ignite_versions(str(DEV_BRANCH), str(LATEST))
-    @matrix(load_type=[ClusterLoad.NONE, ClusterLoad.ATOMIC, 
ClusterLoad.TRANSACTIONAL],
-            failure_detection_timeout=[FAILURE_TIMEOUT])
-    def test_2_nodes_fail_sequential_zk(self, ignite_version, load_type, 
failure_detection_timeout):
+    @matrix(load_type=[ClusterLoad.NONE, ClusterLoad.ATOMIC, 
ClusterLoad.TRANSACTIONAL])
+    def test_2_nodes_fail_sequential_zk(self, ignite_version, load_type):
         """
         Test node failure scenario with ZooKeeperSpi not allowing to fail 
nodes in a row.
         """
         test_config = 
DiscoveryTestConfig(version=IgniteVersion(ignite_version), nodes_to_kill=2,
                                           
load_type=ClusterLoad.construct_from(load_type), sequential_failure=True,
-                                          with_zk=True, 
failure_detection_timeout=failure_detection_timeout)
+                                          with_zk=True)
 
         return self._perform_node_fail_scenario(test_config)
 
     def _perform_node_fail_scenario(self, test_config):
-        max_containers = len(self.test_context.cluster)
+        failure_detection_timeout = 
self._global_int(self.GLOBAL_DETECTION_TIMEOUT, self.DEFAULT_DETECTION_TIMEOUT)
 
         # One node is required to detect the failure.
-        assert max_containers >= 1 + test_config.nodes_to_kill + (
-            DiscoveryTest.ZOOKEEPER_NODES if test_config.with_zk else 0) + (
-                   0 if test_config.load_type == ClusterLoad.NONE else 1), 
"Few required containers: " + \
-                                                                           
str(max_containers) + ". Check the params."
+        assert len(self.test_context.cluster) >= 1 + test_config.nodes_to_kill 
+ (

Review comment:
       as for me, a better case is to reduce warning or perform 
refactoring/decomposition.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to