This is an automated email from the ASF dual-hosted git repository.
timoninmaxim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new ef46b2909a2 [IGNITE-23444] Fix run ducktape ThinClientQueryTest for
custom IgniteNodeSpec (#11594)
ef46b2909a2 is described below
commit ef46b2909a2c3d45ee4eeed1b6cc9f36d8c47e84
Author: okreda1 <[email protected]>
AuthorDate: Thu Oct 17 15:58:32 2024 +0300
[IGNITE-23444] Fix run ducktape ThinClientQueryTest for custom
IgniteNodeSpec (#11594)
---
.../ignitetest/tests/thin_client_query_test.py | 51 +++++++++++++---------
1 file changed, 30 insertions(+), 21 deletions(-)
diff --git a/modules/ducktests/tests/ignitetest/tests/thin_client_query_test.py
b/modules/ducktests/tests/ignitetest/tests/thin_client_query_test.py
index f75c031c788..fc089d1d622 100644
--- a/modules/ducktests/tests/ignitetest/tests/thin_client_query_test.py
+++ b/modules/ducktests/tests/ignitetest/tests/thin_client_query_test.py
@@ -21,7 +21,6 @@ from ducktape.mark import matrix
from ignitetest.services.ignite import IgniteService
from ignitetest.services.ignite_app import IgniteApplicationService
from ignitetest.services.utils.ignite_configuration import
IgniteConfiguration, IgniteThinClientConfiguration
-from ignitetest.services.utils.ignite_spec import IgniteNodeSpec
from ignitetest.services.utils.ssl.client_connector_configuration import
ClientConnectorConfiguration
from ignitetest.utils import cluster, ignite_versions
from ignitetest.utils.ignite_test import IgniteTest
@@ -41,8 +40,8 @@ class ThinClientQueryTest(IgniteTest):
def test_thin_client_index_query(self, server_version, filter):
"""
Thin client IndexQuery test.
- :param server_version Ignite node version.
- :param filter Whether to use filter for queries.
+ :param server_version: Ignite node version.
+ :param filter: Whether to use filter for queries.
"""
server_config =
IgniteConfiguration(version=IgniteVersion(server_version),
@@ -51,7 +50,7 @@ class ThinClientQueryTest(IgniteTest):
ignite = IgniteService(self.test_context, server_config, 2)
if not filter:
- ignite.spec = IgniteNodeSpecExcludeDucktests(service=ignite)
+ ignite.spec = return_spec_without_ducktests(service=ignite,
base_spec=ignite.spec.__class__)
addresses = [ignite.nodes[0].account.hostname + ":" +
str(server_config.client_connector_configuration.port)]
@@ -70,29 +69,39 @@ class ThinClientQueryTest(IgniteTest):
ignite.stop()
-class IgniteNodeSpecExcludeDucktests(IgniteNodeSpec):
+def return_spec_without_ducktests(service, base_spec):
"""
- Ignite node specification that excludes module 'ducktests' from classpath.
+ Return new custom spec required for the test.
+ :param service: IgniteService.
+ :param base_spec: Spec class to inherit from.
"""
- def modules(self):
+
+ class IgniteNodeSpecExcludeDucktests(base_spec):
"""
- Exclude module from preparing USER_LIBS environment variable.
+ Ignite node specification that excludes module 'ducktests' from
classpath.
"""
- modules = super().modules()
- modules.remove("ducktests")
+ def modules(self):
+ """
+ Exclude module from preparing USER_LIBS environment variable.
+ """
+ modules = super().modules()
- return modules
+ modules.remove("ducktests")
- def envs(self):
- """
- Skip the module target directory while building classpath.
- """
- envs = super().envs()
+ return modules
+
+ def envs(self):
+ """
+ Skip the module target directory while building classpath.
+ """
+ envs = super().envs()
+
+ if envs.get("EXCLUDE_MODULES") is not None:
+ envs["EXCLUDE_MODULES"] = envs["EXCLUDE_MODULES"] +
",ducktests"
+ else:
+ envs["EXCLUDE_MODULES"] = "ducktests"
- if envs.get("EXCLUDE_MODULES") is not None:
- envs["EXCLUDE_MODULES"] = envs["EXCLUDE_MODULES"] + ",ducktests"
- else:
- envs["EXCLUDE_MODULES"] = "ducktests"
+ return envs
- return envs
+ return IgniteNodeSpecExcludeDucktests(service=service)