Skip to content

Commit 7b469e2

Browse files
authored
chore(cli-repl): bring back long nonexistent domain test MONGOSH-1717 MONGOSH-7645 (#1832)
* chore: bring back long nonexistent domain test MONGOSH-1717 * chore: bump @mongodb-js/devtools-connect
1 parent 9107498 commit 7b469e2

File tree

6 files changed

+51
-19
lines changed

6 files changed

+51
-19
lines changed

package-lock.json

Lines changed: 33 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@
128128
"workspaces": [
129129
"configs/eslint-config-mongosh",
130130
"configs/tsconfig-mongosh",
131-
"scripts/docker",
132131
"packages/async-rewriter2",
133132
"packages/build",
134133
"packages/errors",
135134
"packages/history",
136135
"packages/java-shell",
137136
"packages/js-multiline-to-singleline",
138137
"packages/types",
138+
"scripts/docker",
139139
"packages/i18n",
140140
"packages/logging",
141141
"packages/service-provider-core",

packages/arg-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"mongodb-connection-string-url": "^3.0.0"
4141
},
4242
"devDependencies": {
43-
"@mongodb-js/devtools-connect": "^2.4.3",
43+
"@mongodb-js/devtools-connect": "^2.4.4",
4444
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
4545
"@mongodb-js/prettier-config-devtools": "^1.0.1",
4646
"@mongodb-js/tsconfig-mongosh": "^1.0.0",

packages/e2e-tests/test/e2e.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,20 @@ describe('e2e', function () {
16041604
expect(exitCode).to.equal(1);
16051605
});
16061606

1607+
it('fails fast for ENOTFOUND/EINVAL errors', async function () {
1608+
// Very long & nonexistent domain can result in EINVAL in Node.js >= 20.11
1609+
// In lower versions, it would be ENOTFOUND
1610+
const shell = TestShell.start({
1611+
args: [
1612+
'mongodb://' +
1613+
'verymuchnonexistentdomainname'.repeat(10) +
1614+
'.mongodb.net/',
1615+
],
1616+
});
1617+
const exitCode = await shell.waitForExit();
1618+
expect(exitCode).to.equal(1);
1619+
});
1620+
16071621
it('fails fast for ECONNREFUSED errors to a single host', async function () {
16081622
const shell = TestShell.start({ args: ['--port', '1'] });
16091623
const result = await shell.waitForPromptOrExit();

packages/logging/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"node": ">=14.15.1"
1818
},
1919
"dependencies": {
20-
"@mongodb-js/devtools-connect": "^2.4.3",
20+
"@mongodb-js/devtools-connect": "^2.4.4",
2121
"@mongosh/errors": "0.0.0-dev.0",
2222
"@mongosh/history": "0.0.0-dev.0",
2323
"@mongosh/types": "0.0.0-dev.0",

packages/service-provider-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
}
4848
},
4949
"dependencies": {
50-
"@mongodb-js/devtools-connect": "^2.4.3",
50+
"@mongodb-js/devtools-connect": "^2.4.4",
5151
"@mongodb-js/oidc-plugin": "^0.3.1",
5252
"@mongosh/errors": "0.0.0-dev.0",
5353
"@mongosh/service-provider-core": "0.0.0-dev.0",

0 commit comments

Comments
 (0)