File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
browserstack-report-action Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -38172,7 +38172,8 @@ async function run() {
3817238172 core.info('Running in test mode with mock API responses');
3817338173 }
3817438174
38175- const timeoutManager = new TimeoutManager(userTimeout);
38175+ const timeoutManager = new TimeoutManager(userTimeout
38176+ || constants.DEFAULT_USER_TIMEOUT_SECONDS);
3817638177 const reportService = new ReportService(authHeader, isTestMode);
3817738178
3817838179 const initialParams = {
@@ -38186,7 +38187,15 @@ async function run() {
3818638187
3818738188 timeoutManager.check();
3818838189 const initialReport = await reportService.fetchReport(initialParams);
38189- const { retryCount: maxRetries, pollingInterval } = initialReport;
38190+ let { retryCount: maxRetries, pollingInterval } = initialReport;
38191+
38192+ if (!pollingInterval) {
38193+ pollingInterval = constants.DEFAULT_POLLING_INTERVAL_SECONDS;
38194+ }
38195+
38196+ if (!maxRetries) {
38197+ maxRetries = constants.DEFAULT_MAX_RETRIES;
38198+ }
3819038199
3819138200 const reportData = await reportService.pollReport(
3819238201 initialParams,
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ async function run() {
2121 core . info ( 'Running in test mode with mock API responses' ) ;
2222 }
2323
24- const timeoutManager = new TimeoutManager ( userTimeout ) ;
24+ const timeoutManager = new TimeoutManager ( userTimeout
25+ || constants . DEFAULT_USER_TIMEOUT_SECONDS ) ;
2526 const reportService = new ReportService ( authHeader , isTestMode ) ;
2627
2728 const initialParams = {
@@ -35,7 +36,15 @@ async function run() {
3536
3637 timeoutManager . check ( ) ;
3738 const initialReport = await reportService . fetchReport ( initialParams ) ;
38- const { retryCount : maxRetries , pollingInterval } = initialReport ;
39+ let { retryCount : maxRetries , pollingInterval } = initialReport ;
40+
41+ if ( ! pollingInterval ) {
42+ pollingInterval = constants . DEFAULT_POLLING_INTERVAL_SECONDS ;
43+ }
44+
45+ if ( ! maxRetries ) {
46+ maxRetries = constants . DEFAULT_MAX_RETRIES ;
47+ }
3948
4049 const reportData = await reportService . pollReport (
4150 initialParams ,
You can’t perform that action at this time.
0 commit comments