Skip to content

Commit 6ba3593

Browse files
committed
review feedback
1 parent faf1a58 commit 6ba3593

File tree

5 files changed

+17
-114
lines changed

5 files changed

+17
-114
lines changed

.evergreen/config.yml

+1-43
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
stepback: true
22
command_type: system
3-
exec_timeout_secs: 1200
3+
exec_timeout_secs: 1500
44
timeout:
55
- command: shell.exec
66
params:
@@ -499,39 +499,6 @@ post:
499499
ignore:
500500
- '*.md'
501501
tasks:
502-
- name: test-latest-server
503-
tags:
504-
- latest
505-
- server
506-
commands:
507-
- func: install dependencies
508-
- func: bootstrap mongo-orchestration
509-
vars:
510-
VERSION: latest
511-
TOPOLOGY: server
512-
- func: run tests
513-
- name: test-latest-replica_set
514-
tags:
515-
- latest
516-
- replica_set
517-
commands:
518-
- func: install dependencies
519-
- func: bootstrap mongo-orchestration
520-
vars:
521-
VERSION: latest
522-
TOPOLOGY: replica_set
523-
- func: run tests
524-
- name: test-latest-sharded_cluster
525-
tags:
526-
- latest
527-
- sharded_cluster
528-
commands:
529-
- func: install dependencies
530-
- func: bootstrap mongo-orchestration
531-
vars:
532-
VERSION: latest
533-
TOPOLOGY: sharded_cluster
534-
- func: run tests
535502
- name: test-latest-server-unified
536503
tags:
537504
- latest
@@ -1582,9 +1549,6 @@ buildvariants:
15821549
expansions:
15831550
NODE_LTS_NAME: fermium
15841551
tasks: &ref_0
1585-
- test-latest-server
1586-
- test-latest-replica_set
1587-
- test-latest-sharded_cluster
15881552
- test-latest-server-unified
15891553
- test-latest-replica_set-unified
15901554
- test-latest-sharded_cluster-unified
@@ -1693,9 +1657,6 @@ buildvariants:
16931657
expansions:
16941658
NODE_LTS_NAME: fermium
16951659
tasks: &ref_1
1696-
- test-latest-server
1697-
- test-latest-replica_set
1698-
- test-latest-sharded_cluster
16991660
- test-latest-server-unified
17001661
- test-latest-replica_set-unified
17011662
- test-latest-sharded_cluster-unified
@@ -1881,9 +1842,6 @@ buildvariants:
18811842
NODE_LTS_NAME: fermium
18821843
CLIENT_ENCRYPTION: true
18831844
tasks: &ref_3
1884-
- test-latest-server
1885-
- test-latest-replica_set
1886-
- test-latest-sharded_cluster
18871845
- test-latest-server-unified
18881846
- test-latest-replica_set-unified
18891847
- test-latest-sharded_cluster-unified

.evergreen/config.yml.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ command_type: system
1111
# Protect ourself against rogue test case, or curl gone wild, that runs forever
1212
# Good rule of thumb: the averageish length a task takes, times 5
1313
# That roughly accounts for variable system performance for various buildvariants
14-
exec_timeout_secs: 1200
14+
exec_timeout_secs: 1500
1515

1616
# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
1717
timeout:

.evergreen/generate_evergreen_tasks.js

+13-8
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ const fs = require('fs');
55
const yaml = require('js-yaml');
66

77
const LATEST_EFFECTIVE_VERSION = '5.0';
8-
const MONGODB_VERSIONS = ['latest', '4.4', '4.2', '4.0', '3.6', '3.4', '3.2', '3.0', '2.6'];
8+
const LEGACY_MONGODB_VERSIONS = new Set(['4.4', '4.2', '4.0', '3.6', '3.4', '3.2', '3.0', '2.6']);
9+
const MONGODB_VERSIONS = ['latest'].concat(Array.from(LEGACY_MONGODB_VERSIONS));
910
const AWS_AUTH_VERSIONS = ['latest', '4.4'];
1011
const OCSP_VERSIONS = ['latest', '4.4'];
1112
const TLS_VERSIONS = ['latest', '4.2']; // also test on 4.2 because 4.4+ currently skipped on windows
1213
const NODE_VERSIONS = ['fermium', 'erbium', 'dubnium', 'carbon', 'boron', 'argon'];
13-
const TOPOLOGIES = ['server', 'replica_set', 'sharded_cluster'].concat([
14-
'server-unified',
15-
'replica_set-unified',
16-
'sharded_cluster-unified'
17-
]);
14+
const LEGACY_TOPOLOGIES = new Set(['server', 'replica_set', 'sharded_cluster']);
15+
const UNIFIED_TOPOLOGIES = Array.from(LEGACY_TOPOLOGIES).map(topology => `${topology}-unified`);
16+
1817

1918
const OPERATING_SYSTEMS = [
2019
{
@@ -110,10 +109,16 @@ function makeTask({ mongoVersion, topology }) {
110109
}
111110

112111
MONGODB_VERSIONS.forEach(mongoVersion => {
113-
TOPOLOGIES.forEach(topology =>
112+
Array.from(LEGACY_TOPOLOGIES).concat(UNIFIED_TOPOLOGIES).forEach(topology => {
113+
if (LEGACY_TOPOLOGIES.has(topology) && !LEGACY_MONGODB_VERSIONS.has(mongoVersion)) {
114+
// MongoDB 5.0+ is only supported by the Unified Topology in driver 3.7+
115+
// therefore testing the legacy toplogy can be skipped
116+
return;
117+
}
114118
BASE_TASKS.push(makeTask({ mongoVersion, topology }))
115-
);
119+
});
116120
});
121+
117122
BASE_TASKS.push({
118123
name: `test-latest-server-v1-api`,
119124
tags: ['latest', 'server', 'v1-api'],

test/functional/cursor.test.js

-56
Original file line numberDiff line numberDiff line change
@@ -4119,62 +4119,6 @@ describe('Cursor', function() {
41194119
}
41204120
});
41214121

4122-
it('Correctly decorate the collection cursor count command with skip, limit, hint, readConcern', {
4123-
// Add a tag that our runner can trigger on
4124-
// in this case we are setting that node needs to be higher than 0.10.X to run
4125-
metadata: {
4126-
requires: {
4127-
topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'],
4128-
mongodb: '<4.9'
4129-
}
4130-
},
4131-
4132-
// The actual test we wish to run
4133-
test: function(done) {
4134-
var started = [];
4135-
4136-
var listener = require('../..').instrument(function(err) {
4137-
test.equal(null, err);
4138-
});
4139-
4140-
listener.on('started', function(event) {
4141-
if (event.commandName === 'count') started.push(event);
4142-
});
4143-
4144-
var configuration = this.configuration;
4145-
var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 });
4146-
client.connect(function(err, client) {
4147-
var db = client.db(configuration.db);
4148-
test.equal(null, err);
4149-
4150-
db.collection('cursor_count_test1', { readConcern: { level: 'local' } }).count(
4151-
{
4152-
project: '123'
4153-
},
4154-
{
4155-
readConcern: { level: 'local' },
4156-
limit: 5,
4157-
skip: 5,
4158-
hint: { project: 1 }
4159-
},
4160-
function(err) {
4161-
test.equal(null, err);
4162-
test.equal(1, started.length);
4163-
if (started[0].command.readConcern)
4164-
test.deepEqual({ level: 'local' }, started[0].command.readConcern);
4165-
test.deepEqual({ project: 1 }, started[0].command.hint);
4166-
test.equal(5, started[0].command.skip);
4167-
test.equal(5, started[0].command.limit);
4168-
4169-
listener.uninstrument();
4170-
4171-
client.close(done);
4172-
}
4173-
);
4174-
});
4175-
}
4176-
});
4177-
41784122
it('Should properly kill a cursor', {
41794123
metadata: {
41804124
requires: {

test/functional/unified-spec-runner/entities.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,10 @@ function serverApiConfig() {
4545
}
4646

4747
function getClient(address) {
48-
const options: any = {
48+
const options: any = {
4949
useUnifiedTopology: Boolean(process.env.MONGODB_UNIFIED_TOPOLOGY),
5050
serverApi: serverApiConfig()
51-
};
52-
const serverApi = serverApiConfig();
53-
if (serverApi) {
54-
options.serverApi = serverApi;
55-
}
51+
};
5652
return new MongoClient(`mongodb://${address}`, options);
5753
}
5854

0 commit comments

Comments
 (0)