Skip to content

Commit 2c5d440

Browse files
authored
test(NODE-3357): extend timeout for atlas connectivity (#2846)
1 parent fd97808 commit 2c5d440

File tree

5 files changed

+30
-3
lines changed

5 files changed

+30
-3
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"root": true,
33
"parserOptions": {
4-
"ecmaVersion": 2017
4+
"ecmaVersion": 2015
55
},
66
"plugins": [
77
"prettier",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../../.eslintrc.json",
3+
"parserOptions": {
4+
"ecmaVersion": 2017
5+
}
6+
}

test/examples/.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../.eslintrc.json",
3+
"parserOptions": {
4+
"ecmaVersion": 2017
5+
}
6+
}

test/functional/apm.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,8 +1143,8 @@ describe('APM', function() {
11431143
for (const test of loadedSpec.tests) {
11441144
it(String(test.description), {
11451145
metadata: { sessions: { skipLeakTests: true } },
1146-
test: async function() {
1147-
await runUnifiedTest(this, loadedSpec, test, testsToSkip);
1146+
test() {
1147+
return runUnifiedTest(this, loadedSpec, test, testsToSkip);
11481148
}
11491149
});
11501150
}

test/manual/atlas_connectivity.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
'use strict';
22
const MongoClient = require('../..').MongoClient;
33

4+
/**
5+
* ATLAS_CONNECTIVITY env variable is JSON
6+
* Here's some typescript describing the shape:
7+
*
8+
* ```typescript
9+
* interface AtlasConnectivity {
10+
* [atlasDeployment: string]: [normalUri: string, srvUri: string]
11+
* }
12+
* ```
13+
*
14+
* It should be an object with descriptive strings about the deployment type and version (i.e. sharded_cluster_3_4)
15+
* 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.
16+
*/
17+
418
describe('Atlas Connectivity', function() {
519
if (process.env.ATLAS_CONNECTIVITY == null) {
620
console.log(
@@ -24,6 +38,7 @@ describe('Atlas Connectivity', function() {
2438

2539
function makeConnectionTest(connectionString, clientOptions) {
2640
return function() {
41+
this.timeout(40000);
2742
const client = new MongoClient(connectionString, clientOptions);
2843

2944
return client

0 commit comments

Comments
 (0)