tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 36dac419b762704e686566261b1eb323b4fe84a0
parent 8f2a37eba55599ed5bfb4bef07a5129cae63a5c1
Author: Jan-Erik Rediger <jrediger@mozilla.com>
Date:   Thu,  4 Dec 2025 16:14:51 +0000

Bug 2000317 - Allow 60 pings per minute in the user activity test r=chutten

Firefox can be quite chatty at startup, triggering the default-limit of
15 pings per minute.
That's fine in normal usage, where the browser runs longer and
eventually starts uploading again.
But the test can't wait for the timeout, so for now we raise the limit
and have all pings get through.

This also addresses bug 2000502 with the same "fix".

Differential Revision: https://phabricator.services.mozilla.com/D275071

Diffstat:
Mtoolkit/components/telemetry/tests/marionette/tests/client/test_fog_usage_reporting.py | 5+++++
Mtoolkit/components/telemetry/tests/marionette/tests/client/test_fog_user_activity.py | 2++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/toolkit/components/telemetry/tests/marionette/tests/client/test_fog_usage_reporting.py b/toolkit/components/telemetry/tests/marionette/tests/client/test_fog_usage_reporting.py @@ -40,6 +40,7 @@ class TestUsageReporting(FOGTestCase): The "deletion-request" ping should not include the usage-id. The `usage.profile_id` stays the same across telemetry toggling. """ + self.marionette.set_pref("telemetry.glean.internal.maxPingsPerMinute", 60) ping1 = self.wait_for_ping( lambda: self.marionette.restart(in_app=True), @@ -100,6 +101,7 @@ class TestUsageReporting(FOGTestCase): We expect a "usage-deletion-request" ping, and it should include the usage-id. """ + self.marionette.set_pref("telemetry.glean.internal.maxPingsPerMinute", 60) ping1 = self.wait_for_ping( lambda: self.marionette.restart(in_app=True), @@ -168,6 +170,7 @@ class TestUsageReporting(FOGTestCase): """ Test that the "usage-reporting" ping remains enabled and the usage ID and usage group ID remain fixed when restarting the browser. """ + self.marionette.set_pref("telemetry.glean.internal.maxPingsPerMinute", 60) # Not guaranteed to send a "usage-reporting" ping. self.enable_usage_reporting() @@ -212,6 +215,7 @@ class TestUsageReporting(FOGTestCase): """ Test that the "usage-reporting" ping remains disabled and the usage ID remains null when restarting the browser. """ + self.marionette.set_pref("telemetry.glean.internal.maxPingsPerMinute", 60) self.enable_usage_reporting() @@ -257,6 +261,7 @@ class TestUsageReporting(FOGTestCase): # Existing profiles should inherit the general preference, true or # false. New profiles should not inherit the general preference, and # instead should default to true. + self.marionette.set_pref("telemetry.glean.internal.maxPingsPerMinute", 60) def healthreportEnabled(): return self.marionette.get_pref("datareporting.healthreport.uploadEnabled") diff --git a/toolkit/components/telemetry/tests/marionette/tests/client/test_fog_user_activity.py b/toolkit/components/telemetry/tests/marionette/tests/client/test_fog_user_activity.py @@ -30,6 +30,8 @@ class TestClientActivity(FOGTestCase): # Let's check we get both. expected_pings = ["baseline", "usage-reporting"] + self.marionette.set_pref("telemetry.glean.internal.maxPingsPerMinute", 60) + # Restarting the browser could send multiple "baseline" pings # (e.g. there could be some pending, or some triggered near shutdown.) # So only accept the "baseline" ping sent near startup.