Backed out 2 changesets (bug 1754527) for turning Bug 1760130 into permafail on windows. CLOSED TREE

Backed out changeset 24ae57f9c2bb (bug 1754527)
Backed out changeset 93e08f7a934a (bug 1754527)
This commit is contained in:
criss 2022-05-11 23:12:05 +03:00
Родитель a6ee3f4082
Коммит 52501f82b5
4 изменённых файлов: 0 добавлений и 99 удалений

Просмотреть файл

@ -416,8 +416,6 @@ class _ExperimentManager {
}
TelemetryEnvironment.setExperimentInactive(slug);
// We also need to set the experiment inactive in the Glean Experiment API
Services.fog.setExperimentInactive(slug);
this.store.updateExperiment(slug, { active: false });
TelemetryEvents.sendEvent("unenroll", TELEMETRY_EVENT_OBJECT, slug, {
@ -485,12 +483,6 @@ class _ExperimentManager {
experiment.enrollmentId || TelemetryEvents.NO_ENROLLMENT_ID_MARKER,
}
);
// Report the experiment to the Glean Experiment API
Services.fog.setExperimentActive(experiment.slug, experiment.branch.slug, {
type: `${TELEMETRY_EXPERIMENT_ACTIVE_PREFIX}${experiment.experimentType}`,
enrollmentId:
experiment.enrollmentId || TelemetryEvents.NO_ENROLLMENT_ID_MARKER,
});
}
/**

Просмотреть файл

@ -209,18 +209,6 @@ add_task(async function test_remote_fetch_and_ready() {
"should call setExperimentActive with `bar` feature"
);
// Test Glean experiment API interaction
Assert.equal(
Services.fog.testGetExperimentData(REMOTE_CONFIGURATION_FOO.slug).branch,
REMOTE_CONFIGURATION_FOO.branches[0].slug,
"Glean.setExperimentActive called with `foo` feature"
);
Assert.equal(
Services.fog.testGetExperimentData(REMOTE_CONFIGURATION_BAR.slug).branch,
REMOTE_CONFIGURATION_BAR.branches[0].slug,
"Glean.setExperimentActive called with `bar` feature"
);
Assert.equal(fooInstance.getVariable("remoteValue"), 42, "Has rollout value");
Assert.equal(barInstance.getVariable("remoteValue"), 3, "Has rollout value");

Просмотреть файл

@ -32,17 +32,6 @@ registerCleanupFunction(() => {
globalSandbox.restore();
});
/**
* FOG requires a little setup in order to test it
*/
add_setup(function test_setup() {
// FOG needs a profile directory to put its data in.
do_get_profile();
// FOG needs to be initialized in order for data to flow.
Services.fog.initializeFOG();
});
/**
* The normal case: Enrollment of a new experiment
*/
@ -122,13 +111,6 @@ add_task(
await manager.onStartup();
// Ensure there is no experiment active with the id in FOG
Assert.equal(
undefined,
Services.fog.testGetExperimentData("foo"),
"no active experiment exists before enrollment"
);
await manager.enroll(
ExperimentFakes.recipe("foo"),
"test_setExperimentActive_sendEnrollmentTelemetry_called"
@ -148,13 +130,6 @@ add_task(
"should call sendEnrollmentTelemetry after an enrollment"
);
// Test Glean experiment API interaction
Assert.notEqual(
undefined,
Services.fog.testGetExperimentData(experiment.slug),
"Glean.setExperimentActive called with `foo` feature"
);
manager.unenroll("foo", "test-cleanup");
}
);
@ -178,13 +153,6 @@ add_task(async function test_setRolloutActive_sendEnrollmentTelemetry_called() {
await manager.onStartup();
// Test Glean experiment API interaction
Assert.equal(
undefined,
Services.fog.testGetExperimentData("rollout"),
"no rollout active before enrollment"
);
let result = await manager.enroll(
rolloutRecipe,
"test_setRolloutActive_sendEnrollmentTelemetry_called"
@ -233,13 +201,6 @@ add_task(async function test_setRolloutActive_sendEnrollmentTelemetry_called() {
"Should send telemetry with expected values"
);
// Test Glean experiment API interaction
Assert.equal(
enrollment.branch.slug,
Services.fog.testGetExperimentData(enrollment.slug).branch,
"Glean.setExperimentActive called with expected values"
);
manager.unenroll("rollout", "test-cleanup");
globalSandbox.restore();

Просмотреть файл

@ -15,17 +15,6 @@ registerCleanupFunction(() => {
globalSandbox.restore();
});
/**
* FOG requires a little setup in order to test it
*/
add_setup(function test_setup() {
// FOG needs a profile directory to put its data in.
do_get_profile();
// FOG needs to be initialized in order for data to flow.
Services.fog.initializeFOG();
});
/**
* Normal unenrollment for experiments:
* - set .active to false
@ -125,35 +114,12 @@ add_task(async function test_setExperimentInactive_called() {
await manager.onStartup();
await manager.store.addEnrollment(experiment);
// Because `manager.store.addEnrollment()` sidesteps telemetry recording
// we will also call on the Glean experiment API directly to test that
// `manager.unenroll()` does in fact call `Glean.setExperimentActive()`
Services.fog.setExperimentActive(
experiment.slug,
experiment.branch.slug,
null
);
// Test Glean experiment API interaction
Assert.notEqual(
undefined,
Services.fog.testGetExperimentData(experiment.slug),
"experiment should be active before unenroll"
);
manager.unenroll("foo", "some-reason");
Assert.ok(
TelemetryEnvironment.setExperimentInactive.calledWith("foo"),
"should call TelemetryEnvironment.setExperimentInactive with slug"
);
// Test Glean experiment API interaction
Assert.equal(
undefined,
Services.fog.testGetExperimentData(experiment.slug),
"experiment should be inactive after unenroll"
);
});
add_task(async function test_send_unenroll_event() {
@ -278,12 +244,6 @@ add_task(async function test_rollout_telemetry_events() {
TelemetryEnvironment.setExperimentInactive.calledWith(rollout.slug),
"Should set rollout to inactive."
);
// Test Glean experiment API interaction
Assert.equal(
undefined,
Services.fog.testGetExperimentData(rollout.slug),
"Should set rollout to inactive"
);
Assert.ok(
TelemetryEvents.sendEvent.calledWith(
"unenroll",