You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by av...@apache.org on 2020/12/07 13:55:33 UTC

[ignite] branch ignite-ducktape updated: IGNITE-13790 Configured detection timeout at cellular switch test (#8520)

This is an automated email from the ASF dual-hosted git repository.

av pushed a commit to branch ignite-ducktape
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-ducktape by this push:
     new eb94300  IGNITE-13790 Configured detection timeout at cellular switch test (#8520)
eb94300 is described below

commit eb94300e5d2808142d886de25f9abf97600db596
Author: Anton Vinogradov <av...@apache.org>
AuthorDate: Mon Dec 7 16:51:16 2020 +0300

    IGNITE-13790 Configured detection timeout at cellular switch test (#8520)
---
 .../tests/ignitetest/services/zk/templates/zookeeper.properties.j2 | 3 +++
 modules/ducktests/tests/ignitetest/services/zk/zookeeper.py        | 2 +-
 modules/ducktests/tests/ignitetest/tests/cellular_affinity_test.py | 7 ++++++-
 modules/ducktests/tests/ignitetest/tests/discovery_test.py         | 3 +--
 4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/modules/ducktests/tests/ignitetest/services/zk/templates/zookeeper.properties.j2 b/modules/ducktests/tests/ignitetest/services/zk/templates/zookeeper.properties.j2
index 441b0db..2ea8c3d 100644
--- a/modules/ducktests/tests/ignitetest/services/zk/templates/zookeeper.properties.j2
+++ b/modules/ducktests/tests/ignitetest/services/zk/templates/zookeeper.properties.j2
@@ -24,3 +24,6 @@ clientPort={{ settings.client_port }}
 {% for node in nodes %}
 server.{{ loop.index }}={{ node.account.hostname }}:2888:3888
 {% endfor %}
+txnLogSizeLimitInKb=5120
+preAllocSize=5120
+forceSync=no
diff --git a/modules/ducktests/tests/ignitetest/services/zk/zookeeper.py b/modules/ducktests/tests/ignitetest/services/zk/zookeeper.py
index d6dffa4..cad575d 100644
--- a/modules/ducktests/tests/ignitetest/services/zk/zookeeper.py
+++ b/modules/ducktests/tests/ignitetest/services/zk/zookeeper.py
@@ -30,8 +30,8 @@ class ZookeeperSettings:
     Settings for zookeeper quorum nodes.
     """
     def __init__(self, **kwargs):
-        self.tick_time = kwargs.get('tick_time', 1000)
         self.min_session_timeout = kwargs.get('min_session_timeout', 2000)
+        self.tick_time = kwargs.get('tick_time', self.min_session_timeout // 3)
         self.init_limit = kwargs.get('init_limit', 10)
         self.sync_limit = kwargs.get('sync_limit', 5)
         self.client_port = kwargs.get('client_port', 2181)
diff --git a/modules/ducktests/tests/ignitetest/tests/cellular_affinity_test.py b/modules/ducktests/tests/ignitetest/tests/cellular_affinity_test.py
index cb56546..e6541fa 100644
--- a/modules/ducktests/tests/ignitetest/tests/cellular_affinity_test.py
+++ b/modules/ducktests/tests/ignitetest/tests/cellular_affinity_test.py
@@ -62,6 +62,9 @@ class CellularAffinity(IgniteTest):
     NODES_PER_CELL = 3
     ZOOKEPER_CLUSTER_SIZE = 3
 
+    FAILURE_DETECTION_TIMEOUT = 500
+    ZOOKEPER_SESSION_TIMEOUT = FAILURE_DETECTION_TIMEOUT
+
     ATTRIBUTE = "CELL"
 
     CACHE_NAME = "test-cache"
@@ -159,7 +162,7 @@ class CellularAffinity(IgniteTest):
         d_type = DiscoreryType.construct_from(discovery_type)
 
         if d_type is DiscoreryType.ZooKeeper:
-            zk_settings = ZookeeperSettings()
+            zk_settings = ZookeeperSettings(min_session_timeout=self.ZOOKEPER_SESSION_TIMEOUT)
             zk_quorum = ZookeeperService(self.test_context, self.ZOOKEPER_CLUSTER_SIZE, settings=zk_settings)
             zk_quorum.start()
 
@@ -267,6 +270,7 @@ class CellularAffinity(IgniteTest):
         prepared_tx_streamer = IgniteApplicationService(  # last server node at the cell.
             self.test_context,
             IgniteConfiguration(version=IgniteVersion(version), properties=self.properties(),
+                                failure_detection_timeout=self.FAILURE_DETECTION_TIMEOUT,
                                 discovery_spi=from_ignite_cluster(nodes) if discovery_spi is None else discovery_spi),
             java_class_name="org.apache.ignite.internal.ducktest.tests.cellular_affinity_test."
                             "CellularPreparedTxStreamer",
@@ -289,6 +293,7 @@ class CellularAffinity(IgniteTest):
             self.test_context,
             IgniteConfiguration(version=IgniteVersion(version), properties=self.properties(),
                                 cluster_state="INACTIVE",
+                                failure_detection_timeout=self.FAILURE_DETECTION_TIMEOUT,
                                 discovery_spi=TcpDiscoverySpi() if discovery_spi is None else discovery_spi),
             num_nodes=nodes_cnt, modules=modules, jvm_opts=jvm_opts, startup_timeout_sec=180)
 
diff --git a/modules/ducktests/tests/ignitetest/tests/discovery_test.py b/modules/ducktests/tests/ignitetest/tests/discovery_test.py
index b5fb66c..eb0d250 100644
--- a/modules/ducktests/tests/ignitetest/tests/discovery_test.py
+++ b/modules/ducktests/tests/ignitetest/tests/discovery_test.py
@@ -276,8 +276,7 @@ def start_zookeeper(test_context, num_nodes, test_config):
     """
     Start zookeeper cluster.
     """
-    zk_settings = ZookeeperSettings(min_session_timeout=test_config.failure_detection_timeout,
-                                    tick_time=test_config.failure_detection_timeout // 3)
+    zk_settings = ZookeeperSettings(min_session_timeout=test_config.failure_detection_timeout)
 
     zk_quorum = ZookeeperService(test_context, num_nodes, settings=zk_settings)
     zk_quorum.start()