Skip to content

Commit 718f687

Browse files
committed
test: move ray and spark tests to component layout (#6050)
Signed-off-by: Nikoloz Turazashvili <turazashvili@gmail.com>
1 parent c2beabb commit 718f687

20 files changed

+36
-63
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ test-python-integration: ## Run Python integration tests (CI)
186186
-k "(not snowflake or not test_historical_features_main)" \
187187
-m "not rbac_remote_integration_test and not ray_offline_stores_only" \
188188
--ignore=sdk/python/tests/integration/registration \
189-
--ignore=sdk/python/tests/integration/compute_engines/ray_compute \
189+
--ignore=sdk/python/tests/component/ray \
190190
--log-cli-level=INFO -s \
191191
sdk/python/tests
192192

@@ -203,7 +203,7 @@ test-python-integration-local: ## Run Python integration tests (local dev mode)
203203
uv run python -m pytest --tb=short -v -n auto --color=yes --integration --durations=10 --timeout=1200 --timeout_method=thread --dist loadgroup \
204204
-k "not test_lambda_materialization and not test_snowflake_materialization" \
205205
-m "not rbac_remote_integration_test and not ray_offline_stores_only" \
206-
--ignore=sdk/python/tests/integration/compute_engines/ray_compute \
206+
--ignore=sdk/python/tests/component/ray \
207207
--ignore=sdk/python/tests/integration/registration \
208208
--log-cli-level=INFO -s \
209209
sdk/python/tests

pixi.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ feast = { path = ".", editable = true, extras = ["ray", "grpcio", "test"] }
289289

290290
[tool.pixi.feature.ray-tests.tasks]
291291
test-offline = { cmd = "python -m pytest -v --integration --ignore=sdk/python/tests/integration/offline_store/test_dqm_validation.py sdk/python/tests/integration/offline_store", env = { PYTHONPATH = ".", FULL_REPO_CONFIGS_MODULE = "sdk.python.tests.universal.feature_repos.ray_repo_configuration", FEAST_IS_LOCAL_TEST = "True" } }
292-
test-compute = { cmd = "python -m pytest -v --integration sdk/python/tests/integration/compute_engines/ray_compute", env = { PYTHONPATH = ".", FEAST_IS_LOCAL_TEST = "True" } }
292+
test-compute = { cmd = "python -m pytest -v --integration sdk/python/tests/component/ray", env = { PYTHONPATH = ".", FEAST_IS_LOCAL_TEST = "True" } }
293293
test = { depends-on = ["test-offline", "test-compute"] }
294294

295295
[tool.pixi.feature.registration-tests.pypi-dependencies]

sdk/python/tests/integration/compute_engines/ray_compute/conftest.py renamed to sdk/python/tests/component/ray/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
auto-discovered by pytest.
55
"""
66

7-
from tests.integration.compute_engines.ray_compute.ray_shared_utils import (
7+
from tests.component.ray.ray_shared_utils import (
88
entity_df,
99
feature_dataset,
1010
ray_environment,

sdk/python/tests/integration/compute_engines/ray_compute/ray_shared_utils.py renamed to sdk/python/tests/component/ray/ray_shared_utils.py

File renamed without changes.

sdk/python/tests/integration/compute_engines/ray_compute/repo_configuration.py renamed to sdk/python/tests/component/ray/repo_configuration.py

File renamed without changes.

sdk/python/tests/integration/compute_engines/ray_compute/test_compute.py renamed to sdk/python/tests/component/ray/test_compute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
)
2222
from feast.transformation.ray_transformation import RayTransformation
2323
from feast.types import Float32, Int32, Int64
24-
from tests.integration.compute_engines.ray_compute.ray_shared_utils import (
24+
from tests.component.ray.ray_shared_utils import (
2525
driver,
2626
now,
2727
)

sdk/python/tests/unit/infra/compute_engines/ray_compute/test_nodes.py renamed to sdk/python/tests/component/ray/test_nodes.py

File renamed without changes.

sdk/python/tests/integration/compute_engines/ray_compute/test_source_feature_views.py renamed to sdk/python/tests/component/ray/test_source_feature_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
MaterializationJobStatus,
1111
)
1212
from feast.types import Float32, Int32, Int64
13-
from tests.integration.compute_engines.ray_compute.ray_shared_utils import (
13+
from tests.component.ray.ray_shared_utils import (
1414
create_entity_df,
1515
create_feature_dataset,
1616
create_unique_sink_source,
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import pytest
2+
from pyspark.sql import SparkSession
3+
4+
5+
@pytest.fixture(scope="session")
6+
def spark_session():
7+
spark = (
8+
SparkSession.builder.appName("FeastSparkTests")
9+
.master("local[*]")
10+
.config("spark.sql.shuffle.partitions", "1")
11+
.config("spark.driver.host", "127.0.0.1")
12+
.config("spark.driver.bindAddress", "127.0.0.1")
13+
.getOrCreate()
14+
)
15+
16+
yield spark
17+
18+
spark.stop()
19+
20+
21+
@pytest.fixture
22+
def spark_fixture(spark_session):
23+
yield spark_session

0 commit comments

Comments
 (0)