From 64316d71f3e24ceba0700e9cbeefef90e5abd1b7 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Wed, 12 Mar 2025 09:45:15 +0000 Subject: [PATCH] test: :white_check_mark: wait 50ms between starting the native and js layers --- .../fixtures/scenario-launcher/src/lib/ScenarioLauncher.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/react-native/features/fixtures/scenario-launcher/src/lib/ScenarioLauncher.js b/test/react-native/features/fixtures/scenario-launcher/src/lib/ScenarioLauncher.js index 6251a09cdd..01713c88db 100644 --- a/test/react-native/features/fixtures/scenario-launcher/src/lib/ScenarioLauncher.js +++ b/test/react-native/features/fixtures/scenario-launcher/src/lib/ScenarioLauncher.js @@ -24,10 +24,17 @@ async function runScenario (scenarioName, apiKey, notifyEndpoint, sessionEndpoin console.error('[Bugsnag ScenarioLauncher] clearing persistent data') NativeInterface.clearPersistentData() + console.error(`[Bugsnag ScenarioLauncher] with config: ${JSON.stringify(nativeConfig)} (native) and ${JSON.stringify(jsConfig)} (js)`) + // start the native client console.error('[Bugsnag ScenarioLauncher] starting native Bugsnag') await NativeInterface.startBugsnag(nativeConfig) + // The calls between starting the native client and starting the js client + // Are typically longer than we see here, so we add a delay to ensure the + // native client is fully initialised before the js client is started + await new Promise(resolve => setTimeout(resolve, 50)) + // start the js client console.error('[Bugsnag ScenarioLauncher] starting js Bugsnag') Bugsnag.start(jsConfig)