File tree Expand file tree Collapse file tree 2 files changed +22
-10
lines changed Expand file tree Collapse file tree 2 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 52
52
PerformanceTest/PerformanceTest.swift
53
53
54
54
- name : Inject Performance Threshold
55
- run : sed -i '.bak'
56
- ' 0 ,/{PERFORMANCE_THRESHOLD_SEC}/s/{PERFORMANCE_THRESHOLD_SEC}/${{ matrix.performanceThresholdSec }}/'
55
+ run : sed -i '.bak'
56
+ ' 1 ,/{PERFORMANCE_THRESHOLD_SEC}/s/{PERFORMANCE_THRESHOLD_SEC}/${{ matrix.performanceThresholdSec }}/'
57
57
PerformanceTest/PerformanceTest.swift
58
58
59
59
- name : XCode Build
Original file line number Diff line number Diff line change @@ -65,17 +65,29 @@ def main(args: argparse.Namespace) -> None:
65
65
'project' : args .project_name ,
66
66
'devices' : devices_dict [args .devices ]
67
67
}
68
- build_response = requests .post (
69
- BUILD_URI .format (args .type ),
70
- headers = build_headers ,
71
- json = build_data ,
72
- auth = (args .username , args .access_key )
73
- )
68
+
69
+ while True :
70
+ build_response = requests .post (
71
+ BUILD_URI .format (args .type ),
72
+ headers = build_headers ,
73
+ json = build_data ,
74
+ auth = (args .username , args .access_key )
75
+ )
76
+ if (build_response is not None and 'message' in build_response .json () and '[BROWSERSTACK_ALL_PARALLELS_IN_USE]'
77
+ in build_response .json ()['message' ]):
78
+ print ('Parallel threads limit reached. Waiting...' )
79
+ time .sleep (60 )
80
+ else :
81
+ break
82
+
83
+ if build_response is None :
84
+ print ('Build Failed' )
85
+ exit (1 )
86
+
74
87
build_response_json = build_response .json ()
75
88
76
89
if not build_response .ok :
77
- print ('Build Failed' , build_response_json )
78
- print ('Build Response' , build_response )
90
+ print ('Build Failed' , build_response .json ())
79
91
exit (1 )
80
92
81
93
if build_response_json ['message' ] != 'Success' :
You can’t perform that action at this time.
0 commit comments