Bug 1956080 - Use async experiment cleanup in browser_sma_submit_onboarding_opt_out_ping.js a=RyanVM

ExperimentManager.unenroll() is now effectively async when running in a
browser test (because we are now executing SQL queries during
unenrollment) so all cleanup functions that trigger unenrollment are
async as well.

Original Revision: https://phabricator.services.mozilla.com/D251603

Differential Revision: https://phabricator.services.mozilla.com/D251908
This commit is contained in:
Beth Rennie
2025-05-31 19:00:17 +00:00
committed by rvandermeulen@mozilla.com
parent 68961d822d
commit d772a98090

View File

@@ -26,14 +26,14 @@ add_task(async function test_SUBMIT_ONBOARDING_OPT_OUT_PING() {
}),
"test"
);
ExperimentAPI.manager.unenroll("foo");
await ExperimentAPI.manager.unenroll("foo");
await ExperimentAPI.manager.enroll(
NimbusTestUtils.factories.recipe.withFeatureConfig("bar", {
featureId: "testFeature",
}),
"test"
);
ExperimentAPI.manager.unenroll("bar");
await ExperimentAPI.manager.unenroll("bar");
await ExperimentAPI.manager.enroll(
NimbusTestUtils.factories.recipe.withFeatureConfig("baz", {
featureId: "testFeature",
@@ -45,7 +45,7 @@ add_task(async function test_SUBMIT_ONBOARDING_OPT_OUT_PING() {
NimbusTestUtils.factories.recipe("rol1", { isRollout: true }),
"test"
);
ExperimentAPI.manager.unenroll("rol1");
await ExperimentAPI.manager.unenroll("rol1");
await ExperimentAPI.manager.enroll(
NimbusTestUtils.factories.recipe("rol2", { isRollout: true }),
"test"