2020from feast .feature import Feature
2121import uuid
2222
23+ _GRPC_CONNECTION_TIMEOUT_APPLY_KEY = 1200
24+
25+ _GRPC_CONNECTION_TIMEOUT_DEFAULT = 20
26+
2327FLOAT_TOLERANCE = 0.00001
2428PROJECT_NAME = 'basic_' + uuid .uuid4 ().hex .upper ()[0 :6 ]
2529
@@ -43,7 +47,10 @@ def allow_dirty(pytestconfig):
4347@pytest .fixture (scope = 'module' )
4448def client (core_url , serving_url , allow_dirty ):
4549 # Get client for core and serving
46- client = Client (core_url = core_url , serving_url = serving_url )
50+ client = Client (core_url = core_url , serving_url = serving_url ,
51+ grpc_connection_timeout_default = _GRPC_CONNECTION_TIMEOUT_DEFAULT ,
52+ grpc_connection_timeout_apply_key = _GRPC_CONNECTION_TIMEOUT_APPLY_KEY ,
53+ batch_feature_request_wait_time_seconds = _GRPC_CONNECTION_TIMEOUT_APPLY_KEY )
4754 client .create_project (PROJECT_NAME )
4855 client .set_project (PROJECT_NAME )
4956
@@ -199,7 +206,7 @@ def test_all_types_ingest_success(client, all_types_dataframe):
199206 all_types_fs = client .get_feature_set (name = "all_types" )
200207
201208 # Ingest user embedding data
202- client .ingest (all_types_fs , all_types_dataframe , timeout = 1200 )
209+ client .ingest (all_types_fs , all_types_dataframe , timeout = _GRPC_CONNECTION_TIMEOUT_APPLY_KEY )
203210
204211
205212@pytest .mark .databricks_skip
@@ -304,7 +311,7 @@ def test_large_volume_ingest_success(client, large_volume_dataframe):
304311 cust_trans_fs = client .get_feature_set (name = "customer_transactions_large" )
305312
306313 # Ingest customer transaction data
307- client .ingest (cust_trans_fs , large_volume_dataframe , timeout = 1200 )
314+ client .ingest (cust_trans_fs , large_volume_dataframe , timeout = _GRPC_CONNECTION_TIMEOUT_APPLY_KEY )
308315
309316
310317@pytest .mark .timeout (300 )
0 commit comments