diff --git a/.evergreen/config.yml b/.evergreen/config.yml index eeaf1812481..fc78c3e8f80 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 192174ceec9..037022480cd 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -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', diff --git a/test/functional/cursor.test.js b/test/functional/cursor.test.js index e745ebb1f3e..ba79b603314 100644 --- a/test/functional/cursor.test.js +++ b/test/functional/cursor.test.js @@ -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) {