ivandasch commented on a change in pull request #9142:
URL: https://github.com/apache/ignite/pull/9142#discussion_r656006157



##########
File path: modules/ducktests/tests/ignitetest/services/utils/ignite_aware.py
##########
@@ -548,6 +549,41 @@ def restore_from_snapshot(self, snapshot_name: str):
             node.account.ssh(f'rm -rf {self.database_dir}', allow_fail=False)
             node.account.ssh(f'cp -r {snapshot_db} {self.work_dir}', 
allow_fail=False)
 
+    def await_rebalance(self, node=None, timeout_sec=600):
+        """
+        Waiting for the rebalance to complete.
+        For the method, you need to set the
+        metric_exporter='org.apache.ignite.spi.metric.jmx.JmxMetricExporterSpi'
+        to the config.
+
+        :param node: Node.
+        :param timeout_sec: Timeout to wait the rebalance to complete.
+        """
+
+        delta_time = datetime.now() + timedelta(seconds=timeout_sec)
+
+        _node = node if node else random.choice(self.alive_nodes)

Review comment:
       It is ok just to write
   ```
   if not node:
       node = random.choice(self.alive_nodes)
   
   ```




-- 
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