Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: reintroduce nodejs fermium testing #2775

Merged
merged 2 commits into from
Apr 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 51 additions & 12 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1430,11 +1430,11 @@ tasks:
TOPOLOGY: server
- func: run custom csfle tests
buildvariants:
- name: macos-1014-erbium
display_name: macOS 10.14 Node Erbium
- name: macos-1014-fermium
display_name: macOS 10.14 Node Fermium
run_on: macos-1014
expansions:
NODE_LTS_NAME: erbium
NODE_LTS_NAME: fermium
tasks: &ref_0
- test-latest-server
- test-latest-replica_set
Expand Down Expand Up @@ -1510,6 +1510,12 @@ buildvariants:
- test-4.4-ocsp-soft-fail
- test-4.4-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple
- test-4.4-ocsp-malicious-no-responder-mustStaple-server-does-not-staple
- name: macos-1014-erbium
display_name: macOS 10.14 Node Erbium
run_on: macos-1014
expansions:
NODE_LTS_NAME: erbium
tasks: *ref_0
- name: macos-1014-dubnium
display_name: macOS 10.14 Node Dubnium
run_on: macos-1014
Expand All @@ -1534,11 +1540,11 @@ buildvariants:
expansions:
NODE_LTS_NAME: argon
tasks: *ref_0
- name: rhel70-erbium
display_name: RHEL 7.0 Node Erbium
- name: rhel70-fermium
display_name: RHEL 7.0 Node Fermium
run_on: rhel70-small
expansions:
NODE_LTS_NAME: erbium
NODE_LTS_NAME: fermium
tasks: &ref_1
- test-latest-server
- test-latest-replica_set
Expand Down Expand Up @@ -1614,6 +1620,12 @@ buildvariants:
- test-4.4-ocsp-soft-fail
- test-4.4-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple
- test-4.4-ocsp-malicious-no-responder-mustStaple-server-does-not-staple
- name: rhel70-erbium
display_name: RHEL 7.0 Node Erbium
run_on: rhel70-small
expansions:
NODE_LTS_NAME: erbium
tasks: *ref_1
- name: rhel70-dubnium
display_name: RHEL 7.0 Node Dubnium
run_on: rhel70-small
Expand All @@ -1638,11 +1650,11 @@ buildvariants:
expansions:
NODE_LTS_NAME: argon
tasks: *ref_1
- name: ubuntu-14.04-erbium
display_name: Ubuntu 14.04 Node Erbium
- name: ubuntu-14.04-fermium
display_name: Ubuntu 14.04 Node Fermium
run_on: ubuntu1404-test
expansions:
NODE_LTS_NAME: erbium
NODE_LTS_NAME: fermium
tasks: &ref_2
- test-4.0-server
- test-4.0-replica_set
Expand Down Expand Up @@ -1684,6 +1696,12 @@ buildvariants:
- test-auth-kerberos-legacy
- test-auth-kerberos-unified
- test-auth-ldap
- name: ubuntu-14.04-erbium
display_name: Ubuntu 14.04 Node Erbium
run_on: ubuntu1404-test
expansions:
NODE_LTS_NAME: erbium
tasks: *ref_2
- name: ubuntu-14.04-dubnium
display_name: Ubuntu 14.04 Node Dubnium
run_on: ubuntu1404-test
Expand All @@ -1708,11 +1726,11 @@ buildvariants:
expansions:
NODE_LTS_NAME: argon
tasks: *ref_2
- name: ubuntu-18.04-erbium
display_name: Ubuntu 18.04 Node Erbium
- name: ubuntu-18.04-fermium
display_name: Ubuntu 18.04 Node Fermium
run_on: ubuntu1804-test
expansions:
NODE_LTS_NAME: erbium
NODE_LTS_NAME: fermium
CLIENT_ENCRYPTION: true
tasks: &ref_3
- test-latest-server
Expand Down Expand Up @@ -1777,6 +1795,13 @@ buildvariants:
- test-4.4-ocsp-soft-fail
- test-4.4-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple
- test-4.4-ocsp-malicious-no-responder-mustStaple-server-does-not-staple
- name: ubuntu-18.04-erbium
display_name: Ubuntu 18.04 Node Erbium
run_on: ubuntu1804-test
expansions:
NODE_LTS_NAME: erbium
CLIENT_ENCRYPTION: true
tasks: *ref_3
- name: ubuntu-18.04-dubnium
display_name: Ubuntu 18.04 Node Dubnium
run_on: ubuntu1804-test
Expand Down Expand Up @@ -1869,6 +1894,13 @@ buildvariants:
NODE_LTS_NAME: argon
MSVS_VERSION: 2013
tasks: *ref_4
- name: windows-64-vs2015-fermium
display_name: Windows (VS2015) Node Fermium
run_on: windows-64-vs2015-large
expansions:
NODE_LTS_NAME: fermium
MSVS_VERSION: 2015
tasks: *ref_4
- name: windows-64-vs2015-erbium
display_name: Windows (VS2015) Node Erbium
run_on: windows-64-vs2015-large
Expand Down Expand Up @@ -1904,6 +1936,13 @@ buildvariants:
NODE_LTS_NAME: argon
MSVS_VERSION: 2015
tasks: *ref_4
- name: windows-64-vs2017-fermium
display_name: Windows (VS2017) Node Fermium
run_on: windows-64-vs2017-large
expansions:
NODE_LTS_NAME: fermium
MSVS_VERSION: 2017
tasks: *ref_4
- name: windows-64-vs2017-erbium
display_name: Windows (VS2017) Node Erbium
run_on: windows-64-vs2017-large
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const MONGODB_VERSIONS = ['latest', '4.4', '4.2', '4.0', '3.6', '3.4', '3.2', '3
const AWS_AUTH_VERSIONS = ['latest', '4.4'];
const OCSP_VERSIONS = ['latest', '4.4'];
const TLS_VERSIONS = ['latest', '4.2']; // also test on 4.2 because 4.4+ currently skipped on windows
const NODE_VERSIONS = ['erbium', 'dubnium', 'carbon', 'boron', 'argon'];
const NODE_VERSIONS = ['fermium', 'erbium', 'dubnium', 'carbon', 'boron', 'argon'];
const TOPOLOGIES = ['server', 'replica_set', 'sharded_cluster'].concat([
'server-unified',
'replica_set-unified',
Expand Down
66 changes: 35 additions & 31 deletions test/functional/cursor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4534,45 +4534,49 @@ describe('Cursor', function() {
});
});

it('should not consume first document on hasNext when streaming', function(done) {
const configuration = this.configuration;
const client = configuration.newClient({ w: 1 }, { poolSize: 1, auto_reconnect: false });

client.connect(err => {
expect(err).to.not.exist;
this.defer(() => client.close());
it('should not consume first document on hasNext when streaming', {
// FIXME: NODE-3184
metadata: { requires: { node: '<14' } },
test(done) {
const configuration = this.configuration;
const client = configuration.newClient({ w: 1 }, { poolSize: 1, auto_reconnect: false });

const collection = client.db().collection('documents');
collection.drop(() => {
const docs = [{ a: 1 }, { a: 2 }, { a: 3 }];
collection.insertMany(docs, err => {
expect(err).to.not.exist;
client.connect(err => {
expect(err).to.not.exist;
this.defer(() => client.close());

const cursor = collection.find({}, { sort: { a: 1 } });
cursor.hasNext((err, hasNext) => {
const collection = client.db().collection('documents');
collection.drop(() => {
const docs = [{ a: 1 }, { a: 2 }, { a: 3 }];
collection.insertMany(docs, err => {
expect(err).to.not.exist;
expect(hasNext).to.be.true;

const collected = [];
const stream = new Writable({
objectMode: true,
write: (chunk, encoding, next) => {
collected.push(chunk);
next(undefined, chunk);
}
});

cursor.on('close', () => {
expect(collected).to.have.length(3);
expect(collected).to.eql(docs);
done();
});
const cursor = collection.find({}, { sort: { a: 1 } });
cursor.hasNext((err, hasNext) => {
expect(err).to.not.exist;
expect(hasNext).to.be.true;

cursor.pipe(stream);
const collected = [];
const stream = new Writable({
objectMode: true,
write: (chunk, encoding, next) => {
collected.push(chunk);
next(undefined, chunk);
}
});

cursor.on('close', () => {
expect(collected).to.have.length(3);
expect(collected).to.eql(docs);
done();
});

cursor.pipe(stream);
});
});
});
});
});
}
});

it('should correctly iterate all documents with a limit set', function(done) {
Expand Down