diff --git a/Makefile b/Makefile index 7851c1f1c5..6ebab4e3be 100644 --- a/Makefile +++ b/Makefile @@ -86,14 +86,14 @@ test-python-unit: python -m pytest -n 8 --color=yes sdk/python/tests test-python-integration: - python -m pytest -n 4 --integration --color=yes --durations=10 --timeout=1200 --timeout_method=thread \ + python -m pytest -n 8 --integration --color=yes --durations=10 --timeout=1200 --timeout_method=thread --dist loadgroup \ -k "(not snowflake or not test_historical_features_main)" \ sdk/python/tests test-python-integration-local: FEAST_IS_LOCAL_TEST=True \ FEAST_LOCAL_ONLINE_CONTAINER=True \ - python -m pytest -n 4 --color=yes --integration --durations=10 --timeout=1200 --timeout_method=thread --dist loadgroup \ + python -m pytest -n 8 --color=yes --integration --durations=10 --timeout=1200 --timeout_method=thread --dist loadgroup \ -k "not test_lambda_materialization and not test_snowflake_materialization" \ sdk/python/tests diff --git a/sdk/python/tests/conftest.py b/sdk/python/tests/conftest.py index d40f699b6b..b5b3e2d9e5 100644 --- a/sdk/python/tests/conftest.py +++ b/sdk/python/tests/conftest.py @@ -279,7 +279,11 @@ def pytest_generate_tests(metafunc: pytest.Metafunc): c = IntegrationTestRepoConfig(**config) if c not in _config_cache: - _config_cache[c] = c + marks = [ + pytest.mark.xdist_group(name=m) + for m in c.offline_store_creator.xdist_groups() + ] + _config_cache[c] = pytest.param(c, marks=marks) configs.append(_config_cache[c]) else: diff --git a/sdk/python/tests/integration/feature_repos/universal/data_source_creator.py b/sdk/python/tests/integration/feature_repos/universal/data_source_creator.py index f1cab21429..aa46160358 100644 --- a/sdk/python/tests/integration/feature_repos/universal/data_source_creator.py +++ b/sdk/python/tests/integration/feature_repos/universal/data_source_creator.py @@ -60,3 +60,6 @@ def create_logged_features_destination(self) -> LoggingDestination: @abstractmethod def teardown(self): raise NotImplementedError + + def xdist_groups() -> list[str]: + return [] diff --git a/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py b/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py index adbb248a20..10d348c056 100644 --- a/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py +++ b/sdk/python/tests/integration/feature_repos/universal/data_sources/file.py @@ -455,6 +455,9 @@ def __init__(self, project_name: str, *args, **kwargs): self.server_port: int = 0 self.proc = None + def xdist_groups() -> list[str]: + return ["keycloak"] + def setup(self, registry: RegistryConfig): parent_offline_config = super().create_offline_store_config() config = RepoConfig(