commit 722c47dfd312afb26f4e33918d7e38d80a622cf9
parent bc783c59bedef094ea6c581e65ddeff84f72d210
Author: Beth Rennie <beth@brennie.ca>
Date: Tue, 2 Dec 2025 18:17:47 +0000
Bug 2003365 - Remove NimbusTestUtils.waitForAllUnenrollments r=nimbus-reviewers,relud
There was one usage of this method and it was redundant because the
cleanup function returned by `NimbusTestUtils.setupTest()` will call
`NimbusTestUtils.assert.storeIsEmpty()`, which does the same asserts.
Differential Revision: https://phabricator.services.mozilla.com/D274647
Diffstat:
2 files changed, 0 insertions(+), 25 deletions(-)
diff --git a/toolkit/components/nimbus/test/NimbusTestUtils.sys.mjs b/toolkit/components/nimbus/test/NimbusTestUtils.sys.mjs
@@ -1396,30 +1396,6 @@ export const NimbusTestUtils = {
}, `Waiting for enrollments of ${expectedSlugs} to sync to database`);
},
- async waitForAllUnenrollments() {
- const profileId = ExperimentAPI.profileId;
-
- await this.flushStore();
- await lazy.TestUtils.waitForCondition(async () => {
- const conn = await lazy.ProfilesDatastoreService.getConnection();
- const slugs = await conn
- .execute(
- `
- SELECT
- slug
- FROM NimbusEnrollments
- WHERE
- active = true AND
- profileId = :profileId;
- `,
- { profileId }
- )
- .then(rows => rows.map(row => row.getResultByName("slug")));
-
- return slugs.length === 0;
- }, "Waiting for unenrollments to sync to database");
- },
-
async flushStore(store = null) {
const db = (store ?? ExperimentAPI.manager.store)._db;
diff --git a/toolkit/components/nimbus/test/unit/test_prefFlips.js b/toolkit/components/nimbus/test/unit/test_prefFlips.js
@@ -164,7 +164,6 @@ async function setupTest({ ...args } = {}) {
...ctx,
async cleanup() {
assertNoObservers(ctx.manager);
- await NimbusTestUtils.waitForAllUnenrollments();
await baseCleanup();
},
};