Skip to content

Commit

Permalink
ci: Catch and log driver setup errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dcalhoun committed Dec 9, 2024
1 parent 752add2 commit 9b477cd
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions packages/react-native-editor/__device-tests__/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,24 @@ const setupDriver = async () => {
? serverConfigs.local
: serverConfigs.sauce;

const driver = await remote( {
...serverConfig,
logLevel: 'error',
// Mitigate driver setup instability by doubling the default timeout
connectionRetryTimeout: 240000,
capabilities: {
platformName: PLATFORM_NAME,
...prefixKeysWithAppium( desiredCaps ),
...sauceOptionsConfig,
},
} );
let driver;
try {
driver = await remote( {
...serverConfig,
logLevel: 'error',
// Mitigate driver setup instability by doubling the default timeout
connectionRetryTimeout: 240000,
capabilities: {
platformName: PLATFORM_NAME,
...prefixKeysWithAppium( desiredCaps ),
...sauceOptionsConfig,
},
} );
} catch ( error ) {
// eslint-disable-next-line no-console
console.error( 'Error setting up the driver:', error );
throw error;
}

await driver.setOrientation( 'PORTRAIT' );
return driver;
Expand Down

0 comments on commit 9b477cd

Please sign in to comment.