1313sys .path .append (cli_path )
1414import raft
1515from raft_sdk .raft_service import RaftCLI
16- from raft_sdk .raft_common import RaftDefinitions
16+ from raft_sdk .raft_common import RaftDefinitions , RaftApiException
1717from raft_sdk .raft_deploy import azure_function_keys
1818
1919def webhooks_test_url (subscription_id , resource_group , function ):
@@ -40,8 +40,23 @@ def bvt(cli, definitions, subs):
4040 test_url = webhooks_test_url (definitions .subscription , definitions .resource_group , definitions .test_infra )
4141 for event in webhook_events :
4242 print (f'Setting webhook for { event } ' )
43- compile_webhook = cli .set_webhooks_subscription ('petstore3-compile' , event , test_url )
44- fuzz_webhook = cli .set_webhooks_subscription ('petstore3-fuzz' , event , test_url )
43+ try :
44+ compile_webhook = cli .set_webhooks_subscription ('petstore3-compile' , event , test_url )
45+ print (f'Set webhooks { compile_webhook } ' )
46+ except RaftApiException as ex :
47+ if ex .status_code == 504 :
48+ print (f'Proceeding even though got gateway timeout error when setting webhook { ex } ' )
49+ else :
50+ raise ex
51+
52+ try :
53+ fuzz_webhook = cli .set_webhooks_subscription ('petstore3-fuzz' , event , test_url )
54+ print (f'Set webhooks { fuzz_webhook } ' )
55+ except RaftApiException as ex :
56+ if ex .status_code == 504 :
57+ print (f'Proceeding even though got gateway timeout error when setting webhook { ex } ' )
58+ else :
59+ raise ex
4560
4661 added_compile = cli .list_webhooks ('petstore3-compile' , event )
4762 if len (added_compile ) == 0 :
0 commit comments