ivandasch commented on a change in pull request #8124:
URL: https://github.com/apache/ignite/pull/8124#discussion_r466355556
##########
File path: modules/ducktests/tests/ignitetest/tests/discovery_test.py
##########
@@ -120,8 +148,20 @@ def __basic_test__(self, version, with_zk=False):
data = {'Ignite cluster start time (s)': self.monotonic() - start}
self.stage("Topology is ready")
- # Node failure detection
- fail_node, survived_node =
self.choose_random_node_to_kill(self.servers)
+ if nodes_to_kill > self.servers.num_nodes - 1:
+ raise Exception("Too many nodes to kill: " + str(nodes_to_kill))
+
+ if with_zk:
+ node_chooser = lambda nodes: random.sample(nodes, nodes_to_kill)
+ elif coordinator:
+ node_chooser = lambda nodes: \
+ next(node for node in nodes if node.discovery_info().node_id
== nodes[0].discovery_info().coordinator)
+ else:
+ node_chooser = lambda nodes: \
+ random.sample([n for n in self.servers.nodes if
n.discovery_info().node_id
+ !=
self.servers.nodes[0].discovery_info().coordinator], nodes_to_kill)
Review comment:
I suppose, that != should remain on previous line
----------------------------------------------------------------
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]