From 6344228c09b211e856f33c0cc2c44c83dcbf347e Mon Sep 17 00:00:00 2001 From: Aaron Heckmann Date: Tue, 28 Oct 2025 08:22:31 -0700 Subject: [PATCH] test: fix race condition --- test/suite.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/suite.mjs b/test/suite.mjs index 5a7bc3a..c026181 100755 --- a/test/suite.mjs +++ b/test/suite.mjs @@ -189,7 +189,9 @@ describe('m - MongoDB Version Management', { concurrency: 5 }, () => { before(async () => { const uninstalled = await getUninstalledVersions(); - version = uninstalled[uninstalled.length - 1]; + // race conditions in the mongodb release process may cause latest to not + // be installable so we pick the second to last uninstalled version. + version = uninstalled[uninstalled.length - 2]; }); test('should install the given version', async () => {