Skip to content

Commit 1153fa8

Browse files
authored
chore(cli-repl): deflake tests by splitting them MONGOSH-2918 MONGOSH-2919 MONGOSH-2972 MONGOSH-2973 (#2565)
While Foliage has closed these tickets, these failures still occur from time to time in our CI, including the latest nightly. Splitting these tests into multiple items seems like a reasonable way to avoid timeouts without losing test coverage.
1 parent e66cc57 commit 1153fa8

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

packages/cli-repl/src/cli-repl.spec.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,19 +2773,19 @@ describe('CliRepl', function () {
27732773
(process as any).version = actualVersions.node;
27742774
});
27752775

2776-
it('prints a deprecation warning when running on platforms with GLIBC < 2.28, otherwise not', async function () {
2777-
for (const { version, deprecated } of [
2778-
{ version: '3.0+glibcstring', deprecated: false },
2779-
{ version: '2.28.2', deprecated: false },
2780-
{ version: '2.28', deprecated: false },
2781-
// This might look like is deprecated but since this is not a valid
2782-
// semver even after co-ercion, we don't push warnings for such versions
2783-
{ version: '1.08', deprecated: false },
2784-
{ version: '2.21', deprecated: true },
2785-
{ version: '2.21-glibcstring', deprecated: true },
2786-
{ version: '2.21.4', deprecated: true },
2787-
{ version: '1.3.8', deprecated: true },
2788-
]) {
2776+
for (const { version, deprecated } of [
2777+
{ version: '3.0+glibcstring', deprecated: false },
2778+
{ version: '2.28.2', deprecated: false },
2779+
{ version: '2.28', deprecated: false },
2780+
// This might look like is deprecated but since this is not a valid
2781+
// semver even after co-ercion, we don't push warnings for such versions
2782+
{ version: '1.08', deprecated: false },
2783+
{ version: '2.21', deprecated: true },
2784+
{ version: '2.21-glibcstring', deprecated: true },
2785+
{ version: '2.21.4', deprecated: true },
2786+
{ version: '1.3.8', deprecated: true },
2787+
]) {
2788+
it(`prints a deprecation warning when running on platforms with GLIBC < 2.28, otherwise not (version=${version})`, async function () {
27892789
cliRepl = new CliRepl(cliReplOptions);
27902790
cliRepl.getGlibcVersion = () => version;
27912791
await cliRepl.start('', {});
@@ -2803,8 +2803,8 @@ describe('CliRepl', function () {
28032803
'Using mongosh on the current operating system is deprecated, and support may be removed in a future release.'
28042804
);
28052805
}
2806-
}
2807-
});
2806+
});
2807+
}
28082808

28092809
it('does not print a platform unsupported deprecation warning when GLIBC information is not present (non-linux systems)', async function () {
28102810
cliRepl = new CliRepl(cliReplOptions);
@@ -2816,17 +2816,17 @@ describe('CliRepl', function () {
28162816
);
28172817
});
28182818

2819-
it('prints a deprecation warning when running with OpenSSL < 3.0.0, otherwise not', async function () {
2820-
for (const { version, deprecated } of [
2821-
{ version: '4.0.1+uniqssl', deprecated: false },
2822-
{ version: '4.0', deprecated: false },
2823-
{ version: '3.0+uniqssl', deprecated: false },
2824-
{ version: '3.0', deprecated: false },
2825-
{ version: '2.21', deprecated: true },
2826-
{ version: '2.21-uniqssl', deprecated: true },
2827-
{ version: '2.21.4', deprecated: true },
2828-
{ version: '1.3.8', deprecated: true },
2829-
]) {
2819+
for (const { version, deprecated } of [
2820+
{ version: '4.0.1+uniqssl', deprecated: false },
2821+
{ version: '4.0', deprecated: false },
2822+
{ version: '3.0+uniqssl', deprecated: false },
2823+
{ version: '3.0', deprecated: false },
2824+
{ version: '2.21', deprecated: true },
2825+
{ version: '2.21-uniqssl', deprecated: true },
2826+
{ version: '2.21.4', deprecated: true },
2827+
{ version: '1.3.8', deprecated: true },
2828+
]) {
2829+
it(`prints a deprecation warning when running with OpenSSL < 3.0.0, otherwise not (version=${version})`, async function () {
28302830
delete (process.versions as any).openssl;
28312831
(process.versions as any).openssl = version;
28322832

@@ -2845,8 +2845,8 @@ describe('CliRepl', function () {
28452845
'Using mongosh with OpenSSL versions lower than 3.0.0 is deprecated, and support may be removed in a future release.'
28462846
);
28472847
}
2848-
}
2849-
});
2848+
});
2849+
}
28502850

28512851
it('prints a deprecation warning when running on Node.js < 20.0.0', async function () {
28522852
for (const { version, deprecated } of [

0 commit comments

Comments
 (0)