nizhikov commented on a change in pull request #8927:
URL: https://github.com/apache/ignite/pull/8927#discussion_r602079100
##########
File path: modules/ducktests/tests/ignitetest/tests/rebalance/__init__.py
##########
@@ -28,30 +28,59 @@
# pylint: disable=too-many-arguments
-def preload_data(context, config, backups, cache_count, entry_count,
entry_size, timeout=3600):
+def preload_data(context, config, preloaders, backups, cache_count,
entry_count, entry_size, timeout=3600):
"""
Puts entry_count of key-value pairs of entry_size bytes to cache_count
caches.
:param context: Test context.
:param config: Ignite configuration.
+ :param preloaders: Preload client nodes count.
:param backups: Cache backups count.
:param cache_count: Cache count.
:param entry_count: Cache entry count.
:param entry_size: Entry size in bytes.
:param timeout: Timeout in seconds for application finished.
:return: Time taken for data preloading.
"""
- app = IgniteApplicationService(
- context,
- config=config,
-
java_class_name="org.apache.ignite.internal.ducktest.tests.rebalance.DataGenerationApplication",
- params={"backups": backups, "cacheCount": cache_count, "entryCount":
entry_count, "entrySize": entry_size},
- startup_timeout_sec=timeout)
- app.run()
-
- app.await_started()
- app.await_stopped()
-
- return (app.get_finish_time() - app.get_init_time()).total_seconds()
+ assert preloaders > 0
+ assert cache_count > 0
+ assert entry_count > 0
+ assert entry_size > 0
+
+ apps = []
+
+ for start_key, range_size in __ranges__(preloaders, entry_count):
+ app0 = IgniteApplicationService(
+ context,
+ config=config,
+
java_class_name="org.apache.ignite.internal.ducktest.tests.rebalance.DataGenerationApplication",
+ params={
+ "backups": backups,
+ "cacheCount": cache_count,
+ "entryCount": range_size,
+ "entrySize": entry_size,
+ "startKey": start_key
+ },
+ startup_timeout_sec=timeout)
+ app0.start_async()
+
+ apps.append(app0)
+
+ for app1 in apps:
+ app1.await_started()
+
+ return (max(map(lambda app: app.get_finish_time(), apps)) -
Review comment:
We should use `sum` of app execution time here.
--
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]