@@ -288,6 +288,7 @@ def _get_online_features_dict_remotely(
288288
289289def get_online_features_dict (
290290 environment : Environment ,
291+ endpoint : str ,
291292 features : Union [List [str ], FeatureService ],
292293 entity_rows : List [Dict [str , Any ]],
293294 full_feature_names : bool = False ,
@@ -305,7 +306,6 @@ def get_online_features_dict(
305306 assertpy .assert_that (online_features ).is_not_none ()
306307 dict1 = online_features .to_dict ()
307308
308- endpoint = environment .get_feature_server_endpoint ()
309309 # If endpoint is None, it means that a local / remote feature server aren't configured
310310 if endpoint is not None :
311311 dict2 = _get_online_features_dict_remotely (
@@ -447,7 +447,7 @@ def test_online_retrieval_with_event_timestamps(
447447@pytest .mark .goserver
448448@pytest .mark .parametrize ("full_feature_names" , [True , False ], ids = lambda v : str (v ))
449449def test_online_retrieval (
450- environment , universal_data_sources , python_server , full_feature_names
450+ environment , universal_data_sources , feature_server_endpoint , full_feature_names
451451):
452452 fs = environment .feature_store
453453 entities , datasets , data_sources = universal_data_sources
@@ -547,6 +547,7 @@ def test_online_retrieval(
547547
548548 online_features_dict = get_online_features_dict (
549549 environment = environment ,
550+ endpoint = feature_server_endpoint ,
550551 features = feature_refs ,
551552 entity_rows = entity_rows ,
552553 full_feature_names = full_feature_names ,
@@ -556,6 +557,7 @@ def test_online_retrieval(
556557 # feature isn't requested.
557558 online_features_no_conv_rate = get_online_features_dict (
558559 environment = environment ,
560+ endpoint = feature_server_endpoint ,
559561 features = [ref for ref in feature_refs if ref != "driver_stats:conv_rate" ],
560562 entity_rows = entity_rows ,
561563 full_feature_names = full_feature_names ,
@@ -616,6 +618,7 @@ def test_online_retrieval(
616618 # Check what happens for missing values
617619 missing_responses_dict = get_online_features_dict (
618620 environment = environment ,
621+ endpoint = feature_server_endpoint ,
619622 features = feature_refs ,
620623 entity_rows = [{"driver_id" : 0 , "customer_id" : 0 , "val_to_add" : 100 }],
621624 full_feature_names = full_feature_names ,
@@ -635,13 +638,15 @@ def test_online_retrieval(
635638 with pytest .raises (RequestDataNotFoundInEntityRowsException ):
636639 get_online_features_dict (
637640 environment = environment ,
641+ endpoint = feature_server_endpoint ,
638642 features = feature_refs ,
639643 entity_rows = [{"driver_id" : 0 , "customer_id" : 0 }],
640644 full_feature_names = full_feature_names ,
641645 )
642646
643647 assert_feature_service_correctness (
644648 environment ,
649+ feature_server_endpoint ,
645650 feature_service ,
646651 entity_rows ,
647652 full_feature_names ,
@@ -659,6 +664,7 @@ def test_online_retrieval(
659664 ]
660665 assert_feature_service_entity_mapping_correctness (
661666 environment ,
667+ feature_server_endpoint ,
662668 feature_service_entity_mapping ,
663669 entity_rows ,
664670 full_feature_names ,
@@ -856,6 +862,7 @@ def get_latest_feature_values_for_location_df(entity_row, origin_df, destination
856862
857863def assert_feature_service_correctness (
858864 environment ,
865+ endpoint ,
859866 feature_service ,
860867 entity_rows ,
861868 full_feature_names ,
@@ -866,6 +873,7 @@ def assert_feature_service_correctness(
866873):
867874 feature_service_online_features_dict = get_online_features_dict (
868875 environment = environment ,
876+ endpoint = endpoint ,
869877 features = feature_service ,
870878 entity_rows = entity_rows ,
871879 full_feature_names = full_feature_names ,
@@ -905,6 +913,7 @@ def assert_feature_service_correctness(
905913
906914def assert_feature_service_entity_mapping_correctness (
907915 environment ,
916+ endpoint ,
908917 feature_service ,
909918 entity_rows ,
910919 full_feature_names ,
@@ -914,6 +923,7 @@ def assert_feature_service_entity_mapping_correctness(
914923 if full_feature_names :
915924 feature_service_online_features_dict = get_online_features_dict (
916925 environment = environment ,
926+ endpoint = endpoint ,
917927 features = feature_service ,
918928 entity_rows = entity_rows ,
919929 full_feature_names = full_feature_names ,
@@ -948,6 +958,7 @@ def assert_feature_service_entity_mapping_correctness(
948958 with pytest .raises (FeatureNameCollisionError ):
949959 get_online_features_dict (
950960 environment = environment ,
961+ endpoint = endpoint ,
951962 features = feature_service ,
952963 entity_rows = entity_rows ,
953964 full_feature_names = full_feature_names ,
0 commit comments