Skip to content

Commit 3708895

Browse files
committed
fix test
Signed-off-by: Danny Chiao <[email protected]>
1 parent 05eced5 commit 3708895

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎sdk/python/tests/integration/registration/test_inference.py‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
update_data_sources_with_inferred_event_timestamp_col,
2323
update_entities_with_inferred_types_from_feature_views,
2424
)
25+
from feast.infra.offline_stores.contrib.spark_offline_store.spark_source import (
26+
SparkSource,
27+
)
2528
from feast.on_demand_feature_view import on_demand_feature_view
2629
from tests.utils.data_source_utils import (
2730
prep_file_source,
@@ -83,7 +86,7 @@ def test_infer_datasource_names_file():
8386

8487
def test_infer_datasource_names_dwh():
8588
table = "project.table"
86-
dwh_classes = [BigQuerySource, RedshiftSource, SnowflakeSource]
89+
dwh_classes = [BigQuerySource, RedshiftSource, SnowflakeSource, SparkSource]
8790

8891
for dwh_class in dwh_classes:
8992
data_source = dwh_class(table=table)
@@ -98,9 +101,13 @@ def test_infer_datasource_names_dwh():
98101
assert data_source_with_query.name == source_name
99102

100103
# If we have a query and no name, throw an error
101-
with pytest.raises(DataSourceNoNameException):
102-
print(f"Testing dwh {dwh_class}")
104+
if dwh_class == SparkSource:
105+
with pytest.raises(DataSourceNoNameException):
106+
print(f"Testing dwh {dwh_class}")
107+
data_source = dwh_class(query="test_query")
108+
else:
103109
data_source = dwh_class(query="test_query")
110+
assert data_source.name == ""
104111

105112

106113
@pytest.mark.integration

0 commit comments

Comments
 (0)