[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] 11/179: Bug 1771348 - Bolster FOG IPC test against timing intermittents. r=janerik, a=test-only



This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch tor-browser-102.2.0esr-12.0-1
in repository tor-browser.

commit f039a251160f98ac4d06676d0d87a5b8c9e312fa
Author: Chris H-C <chutten@xxxxxxxxxxx>
AuthorDate: Mon Jun 20 14:58:18 2022 +0000

    Bug 1771348 - Bolster FOG IPC test against timing intermittents. r=janerik, a=test-only
    
    Differential Revision: https://phabricator.services.mozilla.com/D148315
---
 toolkit/components/glean/tests/xpcshell/test_FOGIPCLimit.js | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/toolkit/components/glean/tests/xpcshell/test_FOGIPCLimit.js b/toolkit/components/glean/tests/xpcshell/test_FOGIPCLimit.js
index 22b1e42220579..397a6943ef859 100644
--- a/toolkit/components/glean/tests/xpcshell/test_FOGIPCLimit.js
+++ b/toolkit/components/glean/tests/xpcshell/test_FOGIPCLimit.js
@@ -7,6 +7,10 @@ const { AppConstants } = ChromeUtils.import(
   "resource://gre/modules/AppConstants.jsm"
 );
 
+const { ContentTaskUtils } = ChromeUtils.import(
+  "resource://testing-common/ContentTaskUtils.jsm"
+);
+
 add_setup(
   /* on Android FOG is set up through head.js */
   { skip_if: () => !runningInParent || AppConstants.platform == "android" },
@@ -34,10 +38,11 @@ add_task(
   async function test_fog_ipc_limit() {
     await run_test_in_child("test_FOGIPCLimit.js");
 
+    await ContentTaskUtils.waitForCondition(() => {
+      return !!Glean.testOnly.badCode.testGetValue();
+    }, "Waiting for IPC.");
+
     // The child exceeded the number of accesses to trigger an IPC flush.
-    // Could potentially intermittently fail if `run_test_in_child` doesn't
-    // wait until the main thread runnable performs the flush.
-    // In practice this seems to reliably succeed, but who knows what the future may hold.
     Assert.greater(
       Glean.testOnly.badCode.testGetValue(),
       FOG_IPC_PAYLOAD_ACCESS_LIMIT

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits