Commit cba229bf authored by Beth Rennie's avatar Beth Rennie Committed by brennie@mozilla.com
Browse files

Bug 1956080 - Use async experiment cleanup in toolkit/components/telemetry tests r=chutten

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.

Differential Revision: https://phabricator.services.mozilla.com/D250560
parent 96fbc1b3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ add_task(
    Assert.ok(numRecords == 1, "Should be 1 cap entry");

    // Unenroll experiment
    doExperimentCleanup();
    await doExperimentCleanup();

    Services.tm.spinEventLoopUntil(
      "Wait for DAPVisitCounter to flush",
@@ -217,6 +217,6 @@ add_task(
      "dapReportContoller should not exist after unenrollment"
    );

    cleanup();
    await cleanup();
  }
);
+2 −2
Original line number Diff line number Diff line
@@ -550,7 +550,7 @@ add_task(skipIfNotBrowser(), async function test_feature_prefs() {
  assertPrefs(900, 899, "http://mochi.test/v900");

  // Unenroll.  Values remain, for consistency while Firefox is running.
  doCleanup();
  await doCleanup();
  Assert.ok(!NimbusFeatures.preonboarding.getVariable("enabled"));
  assertPrefs(900, 899, "http://mochi.test/v900");

@@ -569,7 +569,7 @@ add_task(skipIfNotBrowser(), async function test_feature_prefs() {
  );
  Assert.ok(NimbusFeatures.preonboarding.getVariable("enabled"));
  assertPrefs(900, 899, "http://mochi.test/v900");
  doCleanup();
  await doCleanup();
});

async function doOneModalFlow(version) {