Skip to content

Commit 19cf222

Browse files
authored
chore: Mark tests using keycloak with xdist_group (#4436)
* mark keycloak tests with xdist_group Signed-off-by: tokoko <togurgenidze@gmail.com> * apply changes to test-python-integration Signed-off-by: tokoko <togurgenidze@gmail.com> --------- Signed-off-by: tokoko <togurgenidze@gmail.com> Co-authored-by: tokoko <togurgenidze@gmail.com>
1 parent 896360a commit 19cf222

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ test-python-unit:
8686
python -m pytest -n 8 --color=yes sdk/python/tests
8787

8888
test-python-integration:
89-
python -m pytest -n 4 --integration --color=yes --durations=10 --timeout=1200 --timeout_method=thread \
89+
python -m pytest -n 8 --integration --color=yes --durations=10 --timeout=1200 --timeout_method=thread --dist loadgroup \
9090
-k "(not snowflake or not test_historical_features_main)" \
9191
sdk/python/tests
9292

9393
test-python-integration-local:
9494
FEAST_IS_LOCAL_TEST=True \
9595
FEAST_LOCAL_ONLINE_CONTAINER=True \
96-
python -m pytest -n 4 --color=yes --integration --durations=10 --timeout=1200 --timeout_method=thread --dist loadgroup \
96+
python -m pytest -n 8 --color=yes --integration --durations=10 --timeout=1200 --timeout_method=thread --dist loadgroup \
9797
-k "not test_lambda_materialization and not test_snowflake_materialization" \
9898
sdk/python/tests
9999

sdk/python/tests/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,11 @@ def pytest_generate_tests(metafunc: pytest.Metafunc):
279279
c = IntegrationTestRepoConfig(**config)
280280

281281
if c not in _config_cache:
282-
_config_cache[c] = c
282+
marks = [
283+
pytest.mark.xdist_group(name=m)
284+
for m in c.offline_store_creator.xdist_groups()
285+
]
286+
_config_cache[c] = pytest.param(c, marks=marks)
283287

284288
configs.append(_config_cache[c])
285289
else:

sdk/python/tests/integration/feature_repos/universal/data_source_creator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ def create_logged_features_destination(self) -> LoggingDestination:
6060
@abstractmethod
6161
def teardown(self):
6262
raise NotImplementedError
63+
64+
def xdist_groups() -> list[str]:
65+
return []

sdk/python/tests/integration/feature_repos/universal/data_sources/file.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ def __init__(self, project_name: str, *args, **kwargs):
455455
self.server_port: int = 0
456456
self.proc = None
457457

458+
def xdist_groups() -> list[str]:
459+
return ["keycloak"]
460+
458461
def setup(self, registry: RegistryConfig):
459462
parent_offline_config = super().create_offline_store_config()
460463
config = RepoConfig(

0 commit comments

Comments
 (0)