Skip to content

Commit

Permalink
chore: Mark tests using keycloak with xdist_group (feast-dev#4436)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
tokoko and tokoko authored Aug 25, 2024
1 parent 896360a commit 19cf222
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 5 additions & 1 deletion sdk/python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ def create_logged_features_destination(self) -> LoggingDestination:
@abstractmethod
def teardown(self):
raise NotImplementedError

def xdist_groups() -> list[str]:
return []
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 19cf222

Please sign in to comment.