Bug 1533574 - Work around a race condition in an about:debugging test. r=jlast
authorJason Orendorff <jorendorff@mozilla.com>
Mon, 11 Mar 2019 15:20:46 +0000
changeset 521390 a8d439676de0
parent 521389 ea2b6fafbb08
child 521391 43c98aac932a
push id10866
push usernerli@mozilla.com
push dateTue, 12 Mar 2019 18:59:09 +0000
treeherdermozilla-beta@445c24a51727 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1533574
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1533574 - Work around a race condition in an about:debugging test. r=jlast Differential Revision: https://phabricator.services.mozilla.com/D22740
devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_telemetry_runtime_updates.js
--- a/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_telemetry_runtime_updates.js
+++ b/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_telemetry_runtime_updates.js
@@ -90,16 +90,20 @@ add_task(async function testUsbRuntimeUp
   const runtime2Id = evts.filter(e => e.method === "runtime_added")[0].extras.runtime_id;
   const runtime2Extras = Object.assign({}, RUNTIME_2_EXTRAS, {
     "runtime_id": runtime2Id,
   });
 
   info("Remove runtime 1");
   await removeUsbRuntime(USB_RUNTIME_1, mocks, document);
 
+  // Wait a tick for telementry events to settle. (removeUsbRuntime only waits
+  // for the UI to update.)
+  await undefined;
+
   checkTelemetryEvents([
     { method: "runtime_disconnected", extras: runtime1ConnectedExtras },
     { method: "runtime_removed", extras: runtime1Extras },
   ], sessionId);
 
   info("Remove runtime 2");
   await removeUsbRuntime(USB_RUNTIME_2, mocks, document);