diff --git a/esrally/mechanic/launcher.py b/esrally/mechanic/launcher.py index c113f9f49..73bb42d39 100644 --- a/esrally/mechanic/launcher.py +++ b/esrally/mechanic/launcher.py @@ -258,4 +258,4 @@ def stop(self, nodes, metrics_store): # store system metrics in any case (telemetry devices may derive system metrics while the node is running) if metrics_store: node.telemetry.store_system_metrics(node, metrics_store) - return stopped_nodes + return stopped_nodes diff --git a/tests/mechanic/launcher_test.py b/tests/mechanic/launcher_test.py index 0bab38e89..a6d3ece5c 100644 --- a/tests/mechanic/launcher_test.py +++ b/tests/mechanic/launcher_test.py @@ -174,12 +174,14 @@ def test_daemon_start_stop(self, wait_for_pidfile, chdir, get_size, supports, ja ms = get_metrics_store(cfg) proc_launcher = launcher.ProcessLauncher(cfg) - node_config = NodeConfiguration(build_type="tar", car_env={}, car_runtime_jdks="12,11", ip="127.0.0.1", - node_name="testnode", node_root_path="/tmp", binary_path="/tmp", - data_paths="/tmp") - - nodes = proc_launcher.start([node_config]) - self.assertEqual(len(nodes), 1) + node_configs = [] + for node in range(2): + node_configs.append(NodeConfiguration(build_type="tar", car_env={}, car_runtime_jdks="12,11", + ip="127.0.0.1", node_name="testnode-{}".format(node), + node_root_path="/tmp", binary_path="/tmp", data_paths="/tmp")) + + nodes = proc_launcher.start(node_configs) + self.assertEqual(len(nodes), 2) self.assertEqual(nodes[0].pid, MOCK_PID_VALUE) stopped_nodes = proc_launcher.stop(nodes, ms)