зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1658359 - Suppress Glean-sent pings in tests that redirect Telemetry r=janerik
I would redirect Glean-sent pings instead of suppressing them, but network errors seem to be causing unrelated failures in toolkit/mozapps/extensions/test/browser/browser_html_discover_view_clientid.js Differential Revision: https://phabricator.services.mozilla.com/D88980
This commit is contained in:
Родитель
8b4b4c2645
Коммит
1776c98e00
|
@ -9297,7 +9297,7 @@
|
|||
mirror: always
|
||||
|
||||
- name: telemetry.fog.test.localhost_port
|
||||
type: RelaxedAtomicUint32
|
||||
type: RelaxedAtomicInt32
|
||||
value: 0
|
||||
mirror: always
|
||||
rust: true
|
||||
|
|
|
@ -82,6 +82,7 @@ user_pref("privacy.trackingprotection.pbmode.enabled", false);
|
|||
user_pref("security.enable_java", false);
|
||||
user_pref("security.fileuri.strict_origin_policy", false);
|
||||
user_pref("toolkit.telemetry.server", "https://127.0.0.1/telemetry-dummy/");
|
||||
user_pref("telemetry.fog.test.localhost_port", -1);
|
||||
user_pref("startup.homepage_welcome_url", "");
|
||||
user_pref("startup.homepage_welcome_url.additional", "");
|
||||
user_pref("trailhead.firstrun.branches", "join");
|
||||
|
|
|
@ -9,3 +9,4 @@ user_pref("browser.cache.disk.smart_size.enabled", true);
|
|||
user_pref("extensions.webextensions.warnings-as-errors", false);
|
||||
// disable telemetry bug 1639148
|
||||
user_pref("toolkit.telemetry.server", "");
|
||||
user_pref("telemetry.fog.test.localhost_port", -1);
|
||||
|
|
|
@ -90,6 +90,7 @@ user_pref("testing.supports.moz-bool-pref", false);
|
|||
// server in the middle of the tests.
|
||||
user_pref("toolkit.telemetry.enabled", false);
|
||||
user_pref("toolkit.telemetry.server", "https://%(server)s/telemetry-dummy/");
|
||||
user_pref("telemetry.fog.test.localhost_port", -1);
|
||||
user_pref("ui.caretBlinkTime", -1);
|
||||
user_pref("ui.caretWidth", 1);
|
||||
user_pref("ui.prefersReducedMotion", 0);
|
||||
|
|
|
@ -216,6 +216,7 @@ user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
|
|||
user_pref("toolkit.telemetry.newProfilePing.enabled", false);
|
||||
// We want to collect telemetry, but we don't want to send in the results.
|
||||
user_pref("toolkit.telemetry.server", "https://{server}/telemetry-dummy/");
|
||||
user_pref("telemetry.fog.test.localhost_port", -1);
|
||||
// Don't send the 'shutdown' ping using the pingsender on the first session using
|
||||
// the 'pingsender' process. Valgrind marks the process as leaky (e.g. see bug 1364068
|
||||
// for the 'new-profile' ping) but does not provide enough information
|
||||
|
|
|
@ -14,6 +14,7 @@ user_pref("geo.provider.network.compare.url", "");
|
|||
user_pref("media.gmp-manager.updateEnabled", false);
|
||||
user_pref("media.gmp-manager.url.override", "http://%(server)s/dummy-gmp-manager.xml");
|
||||
user_pref("toolkit.telemetry.server", "https://%(server)s/telemetry-dummy");
|
||||
user_pref("telemetry.fog.test.localhost_port", -1);
|
||||
// Prevent Remote Settings to issue non local connections.
|
||||
user_pref("services.settings.server", "http://localhost/remote-settings-dummy/v1");
|
||||
// Prevent intermediate preloads to be downloaded on Remote Settings polling.
|
||||
|
|
|
@ -16,4 +16,6 @@ and no data collections will be persisted or reported from that point.
|
|||
|
||||
If set to a value `port` which is greater than 0, pings will be sent to
|
||||
`http://localhost:port` instead of `https://incoming.telemetry.mozilla.org`.
|
||||
If set to a value which is less than 0, FOG will not squelch all sent pings,
|
||||
telling the Glean SDK that the ping was sent successfully.
|
||||
Defaults to 0.
|
||||
|
|
|
@ -151,6 +151,9 @@ fn register_uploader() {
|
|||
let localhost_port = static_prefs::pref!("telemetry.fog.test.localhost_port");
|
||||
if localhost_port > 0 {
|
||||
server = format!("http://localhost:{}", localhost_port);
|
||||
} else if localhost_port < 0 {
|
||||
log::info!("FOG Ping uploader faking success");
|
||||
return Ok(UploadResult::HttpStatus(200));
|
||||
}
|
||||
let url = Url::parse(&server)?.join(&ping_request.path)?;
|
||||
log::info!("FOG Ping uploader uploading to {:?}", url);
|
||||
|
|
|
@ -67,6 +67,7 @@ def fixture_marionette(binary, ping_server):
|
|||
# Disable smart sizing because it changes prefs at startup. (bug 1547750)
|
||||
"browser.cache.disk.smart_size.enabled": False,
|
||||
"toolkit.telemetry.server": server_url,
|
||||
"telemetry.fog.test.localhost_port": -1,
|
||||
"toolkit.telemetry.initDelay": 1,
|
||||
"toolkit.telemetry.minSubsessionLength": 0,
|
||||
"datareporting.healthreport.uploadEnabled": True,
|
||||
|
|
|
@ -32,6 +32,7 @@ class TelemetryTestRunner(BaseMarionetteTestRunner):
|
|||
# Disable smart sizing because it changes prefs at startup. (bug 1547750)
|
||||
"browser.cache.disk.smart_size.enabled": False,
|
||||
"toolkit.telemetry.server": "{}/pings".format(SERVER_URL),
|
||||
"telemetry.fog.test.localhost_port": -1,
|
||||
"toolkit.telemetry.initDelay": 1,
|
||||
"toolkit.telemetry.minSubsessionLength": 0,
|
||||
"datareporting.healthreport.uploadEnabled": True,
|
||||
|
|
|
@ -112,6 +112,7 @@ add_task(async function run_test() {
|
|||
"toolkit.telemetry.server",
|
||||
"http://a.telemetry.server"
|
||||
);
|
||||
Services.prefs.setIntPref("telemetry.fog.test.localhost_port", -1);
|
||||
Services.prefs.setCharPref(
|
||||
"toolkit.telemetry.cachedClientID",
|
||||
"f3582dee-22b9-4d73-96d1-79ef5bf2fc24"
|
||||
|
|
|
@ -829,6 +829,10 @@ add_task(async function checkDiscopaneNotice() {
|
|||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["browser.discovery.enabled", true],
|
||||
// Enabling the Data Upload pref may upload data.
|
||||
// Point data reporting services to localhost so the data doesn't escape.
|
||||
["toolkit.telemetry.server", "https://localhost:1337"],
|
||||
["telemetry.fog.test.localhost_port", -1],
|
||||
["datareporting.healthreport.uploadEnabled", true],
|
||||
["extensions.htmlaboutaddons.recommendations.enabled", true],
|
||||
["extensions.recommendations.hideNotice", false],
|
||||
|
|
|
@ -44,6 +44,10 @@ add_task(async function setup() {
|
|||
set: [
|
||||
// Enable clientid - see Discovery.jsm for the first two prefs.
|
||||
["browser.discovery.enabled", true],
|
||||
// Enabling the Data Upload pref may upload data.
|
||||
// Point data reporting services to localhost so the data doesn't escape.
|
||||
["toolkit.telemetry.server", "https://localhost:1337"],
|
||||
["telemetry.fog.test.localhost_port", -1],
|
||||
["datareporting.healthreport.uploadEnabled", true],
|
||||
["extensions.getAddons.discovery.api_url", `${serverBaseUrl}discoapi`],
|
||||
["app.support.baseURL", `${serverBaseUrl}sumo/`],
|
||||
|
|
Загрузка…
Ссылка в новой задаче