2121from ignitetest .services .ignite import IgniteService
2222from ignitetest .services .ignite_app import IgniteApplicationService
2323from ignitetest .services .utils .ignite_configuration import IgniteConfiguration , IgniteThinClientConfiguration
24- from ignitetest .services .utils .ignite_spec import IgniteNodeSpec
2524from ignitetest .services .utils .ssl .client_connector_configuration import ClientConnectorConfiguration
2625from ignitetest .utils import cluster , ignite_versions
2726from ignitetest .utils .ignite_test import IgniteTest
@@ -41,8 +40,8 @@ class ThinClientQueryTest(IgniteTest):
4140 def test_thin_client_index_query (self , server_version , filter ):
4241 """
4342 Thin client IndexQuery test.
44- :param server_version Ignite node version.
45- :param filter Whether to use filter for queries.
43+ :param server_version: Ignite node version.
44+ :param filter: Whether to use filter for queries.
4645 """
4746
4847 server_config = IgniteConfiguration (version = IgniteVersion (server_version ),
@@ -51,7 +50,7 @@ def test_thin_client_index_query(self, server_version, filter):
5150 ignite = IgniteService (self .test_context , server_config , 2 )
5251
5352 if not filter :
54- ignite .spec = IgniteNodeSpecExcludeDucktests (service = ignite )
53+ ignite .spec = return_spec_without_ducktests (service = ignite , base_spec = ignite . spec . __class__ )
5554
5655 addresses = [ignite .nodes [0 ].account .hostname + ":" + str (server_config .client_connector_configuration .port )]
5756
@@ -70,29 +69,39 @@ def test_thin_client_index_query(self, server_version, filter):
7069 ignite .stop ()
7170
7271
73- class IgniteNodeSpecExcludeDucktests ( IgniteNodeSpec ):
72+ def return_spec_without_ducktests ( service , base_spec ):
7473 """
75- Ignite node specification that excludes module 'ducktests' from classpath.
74+ Return new custom spec required for the test.
75+ :param service: IgniteService.
76+ :param base_spec: Spec class to inherit from.
7677 """
77- def modules (self ):
78+
79+ class IgniteNodeSpecExcludeDucktests (base_spec ):
7880 """
79- Exclude module from preparing USER_LIBS environment variable .
81+ Ignite node specification that excludes module 'ducktests' from classpath .
8082 """
81- modules = super ().modules ()
8283
83- modules .remove ("ducktests" )
84+ def modules (self ):
85+ """
86+ Exclude module from preparing USER_LIBS environment variable.
87+ """
88+ modules = super ().modules ()
8489
85- return modules
90+ modules . remove ( "ducktests" )
8691
87- def envs (self ):
88- """
89- Skip the module target directory while building classpath.
90- """
91- envs = super ().envs ()
92+ return modules
93+
94+ def envs (self ):
95+ """
96+ Skip the module target directory while building classpath.
97+ """
98+ envs = super ().envs ()
99+
100+ if envs .get ("EXCLUDE_MODULES" ) is not None :
101+ envs ["EXCLUDE_MODULES" ] = envs ["EXCLUDE_MODULES" ] + ",ducktests"
102+ else :
103+ envs ["EXCLUDE_MODULES" ] = "ducktests"
92104
93- if envs .get ("EXCLUDE_MODULES" ) is not None :
94- envs ["EXCLUDE_MODULES" ] = envs ["EXCLUDE_MODULES" ] + ",ducktests"
95- else :
96- envs ["EXCLUDE_MODULES" ] = "ducktests"
105+ return envs
97106
98- return envs
107+ return IgniteNodeSpecExcludeDucktests ( service = service )
0 commit comments