Skip to content

Commit

Permalink
test(NODE-3357): extend timeout for atlas connectivity (#2846)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Jun 15, 2021
1 parent fd97808 commit 2c5d440
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 2017
"ecmaVersion": 2015
},
"plugins": [
"prettier",
Expand Down
6 changes: 6 additions & 0 deletions test/benchmarks/driverBench/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../../.eslintrc.json",
"parserOptions": {
"ecmaVersion": 2017
}
}
6 changes: 6 additions & 0 deletions test/examples/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../.eslintrc.json",
"parserOptions": {
"ecmaVersion": 2017
}
}
4 changes: 2 additions & 2 deletions test/functional/apm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1143,8 +1143,8 @@ describe('APM', function() {
for (const test of loadedSpec.tests) {
it(String(test.description), {
metadata: { sessions: { skipLeakTests: true } },
test: async function() {
await runUnifiedTest(this, loadedSpec, test, testsToSkip);
test() {
return runUnifiedTest(this, loadedSpec, test, testsToSkip);
}
});
}
Expand Down
15 changes: 15 additions & 0 deletions test/manual/atlas_connectivity.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
'use strict';
const MongoClient = require('../..').MongoClient;

/**
* ATLAS_CONNECTIVITY env variable is JSON
* Here's some typescript describing the shape:
*
* ```typescript
* interface AtlasConnectivity {
* [atlasDeployment: string]: [normalUri: string, srvUri: string]
* }
* ```
*
* It should be an object with descriptive strings about the deployment type and version (i.e. sharded_cluster_3_4)
* that map to a two string tuple that are the normal URI and SRV URI, order doesn't matter, but it should be that order.
*/

describe('Atlas Connectivity', function() {
if (process.env.ATLAS_CONNECTIVITY == null) {
console.log(
Expand All @@ -24,6 +38,7 @@ describe('Atlas Connectivity', function() {

function makeConnectionTest(connectionString, clientOptions) {
return function() {
this.timeout(40000);
const client = new MongoClient(connectionString, clientOptions);

return client
Expand Down

0 comments on commit 2c5d440

Please sign in to comment.