File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,8 @@ const getSupportsClientHints = ({ browser, browser_version }) => {
9696 ) ;
9797} ;
9898
99- // 1080000 ms = 10 minutes
100- const getDriverWithTimeout = ( capabilitiesRaw , timeout = 1080000 ) =>
99+ // 300000 ms = 5 minutes
100+ const getDriverWithTimeout = ( capabilitiesRaw , { timeout = 300000 } = { } ) =>
101101 new Promise ( ( resolve ) => {
102102 // Clean up capabilities
103103 const capabilities = { ...capabilitiesRaw } ;
@@ -252,11 +252,14 @@ const getDeviceName = ({
252252 driverOptions [ "browserstack.timezone" ] = "Amsterdam" ;
253253 }
254254
255- let driver = await getDriverWithTimeout ( driverOptions ) ;
255+ let driver = await getDriverWithTimeout ( driverOptions , {
256+ timeout : 180000 ,
257+ } ) ;
256258
257259 // Try again with new device when driver is not available
258260 if ( typeof driver ?. get !== "function" ) {
259- driver = await getDriverWithTimeout ( driverOptions ) ;
261+ log ( `Trying again` ) ;
262+ driver = await getDriverWithTimeout ( driverOptions , { timeout : 300000 } ) ;
260263
261264 // Device seems unavailable so this test will fail
262265 if ( typeof driver ?. get !== "function" ) {
You can’t perform that action at this time.
0 commit comments