timoninmaxim commented on a change in pull request #8385:
URL: https://github.com/apache/ignite/pull/8385#discussion_r596604502



##########
File path: modules/ducktests/tests/ignitetest/services/utils/ignite_aware.py
##########
@@ -459,3 +459,26 @@ 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, timeout_sec=180):
+        """
+        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 timeout_sec: timeout to wait the rebalance to complete.
+        """
+        delta_time = datetime.now() + timedelta(seconds=timeout_sec)
+
+        rebalanced = False

Review comment:
       Unuseful var. There is already rebalanced var declared on the 475 line. 
If `self.nodes` is empty then code raises TimeoutError, but it is actually 
wrong. Please replace it with logic that shold handle empty nodes list if it is 
required.




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