diff --git a/.evergreen/config.yml b/.evergreen/config.yml index e22ced00e47..539e2a0146e 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -101,6 +101,7 @@ functions: type: test params: working_dir: src + timeout_secs: 60 script: | ${PREPARE_SHELL} diff --git a/.evergreen/config.yml.in b/.evergreen/config.yml.in index e450f48340f..fcd0f98d224 100644 --- a/.evergreen/config.yml.in +++ b/.evergreen/config.yml.in @@ -121,6 +121,7 @@ functions: type: test params: working_dir: "src" + timeout_secs: 60 script: | ${PREPARE_SHELL} diff --git a/test/functional/cmap/connection.test.js b/test/functional/cmap/connection.test.js index 121fa94ec5a..8b51ed22e12 100644 --- a/test/functional/cmap/connection.test.js +++ b/test/functional/cmap/connection.test.js @@ -61,19 +61,22 @@ describe('Connection', function() { }); }); - it('should support socket timeouts', function(done) { - const connectOptions = Object.assign({ - host: '240.0.0.1', - connectionType: Connection, - bson: new BSON(), - connectionTimeout: 500 - }); + it('should support socket timeouts', { + metadata: { requires: { os: '!win32' } }, + test: function(done) { + const connectOptions = Object.assign({ + host: '240.0.0.1', + connectionType: Connection, + bson: new BSON(), + connectionTimeout: 500 + }); - connect(connectOptions, err => { - expect(err).to.exist; - expect(err).to.match(/timed out/); - done(); - }); + connect(connectOptions, err => { + expect(err).to.exist; + expect(err).to.match(/timed out/); + done(); + }); + } }); it('should support calling back multiple times on exhaust commands', { diff --git a/test/functional/connection.test.js b/test/functional/connection.test.js index a75916eeb6f..2f56b47ce66 100644 --- a/test/functional/connection.test.js +++ b/test/functional/connection.test.js @@ -12,7 +12,7 @@ describe('Connection', function() { * @ignore */ it('should correctly start monitoring for single server connection', { - metadata: { requires: { topology: 'single' } }, + metadata: { requires: { topology: 'single', os: '!win32' } }, // The actual test we wish to run test: function(done) { @@ -36,7 +36,7 @@ describe('Connection', function() { * @ignore */ it('should correctly disable monitoring for single server connection', { - metadata: { requires: { topology: 'single' } }, + metadata: { requires: { topology: 'single', os: '!win32' } }, // The actual test we wish to run test: function(done) { @@ -64,7 +64,7 @@ describe('Connection', function() { * @ignore */ it('should correctly connect to server using domain socket', { - metadata: { requires: { topology: 'single' } }, + metadata: { requires: { topology: 'single', os: '!win32' } }, // The actual test we wish to run test: function(done) { @@ -161,7 +161,7 @@ describe('Connection', function() { * @ignore */ it('should connect to server using domain socket with undefined port', { - metadata: { requires: { topology: 'single' } }, + metadata: { requires: { topology: 'single', os: '!win32' } }, // The actual test we wish to run test: function(done) { diff --git a/test/functional/core/rs_mocks/connection.test.js b/test/functional/core/rs_mocks/connection.test.js index 34c4fb9a107..15f4e3e1201 100644 --- a/test/functional/core/rs_mocks/connection.test.js +++ b/test/functional/core/rs_mocks/connection.test.js @@ -267,7 +267,8 @@ describe('ReplSet Connection Tests (mocks)', function() { metadata: { requires: { generators: true, - topology: 'single' + topology: 'single', + os: '!win32' } }, @@ -375,7 +376,8 @@ describe('ReplSet Connection Tests (mocks)', function() { metadata: { requires: { generators: true, - topology: 'single' + topology: 'single', + os: '!win32' } }, diff --git a/test/functional/cursor.test.js b/test/functional/cursor.test.js index 64a07f2ab3b..2d51fc6d784 100644 --- a/test/functional/cursor.test.js +++ b/test/functional/cursor.test.js @@ -2216,7 +2216,10 @@ describe('Cursor', function() { // Add a tag that our runner can trigger on // in this case we are setting that node needs to be higher than 0.10.X to run metadata: { - requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } + requires: { + topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'], + os: '!win32' + } }, // The actual test we wish to run diff --git a/test/functional/mongo_client.test.js b/test/functional/mongo_client.test.js index 3943a04bcb8..a2081144d21 100644 --- a/test/functional/mongo_client.test.js +++ b/test/functional/mongo_client.test.js @@ -487,7 +487,7 @@ describe('MongoClient', function() { }); it('should correctly connect to mongodb using domain socket', { - metadata: { requires: { topology: ['single'] } }, + metadata: { requires: { topology: ['single'], os: '!win32' } }, // The actual test we wish to run test: function(done) { diff --git a/test/mocha.opts b/test/mocha.opts index cf335621394..7f44530476a 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -3,3 +3,4 @@ --file test/tools/runner --ui test/tools/runner/metadata_ui.js --reporter spec-xunit-file + --color diff --git a/test/unit/core/connect.test.js b/test/unit/core/connect.test.js index 2659c7f2a4d..c73016a562e 100644 --- a/test/unit/core/connect.test.js +++ b/test/unit/core/connect.test.js @@ -100,17 +100,20 @@ describe('Connect Tests', function() { }); }); - it('should allow a cancellaton token', function(done) { - const cancellationToken = new EventEmitter(); - setTimeout(() => cancellationToken.emit('cancel'), 500); - // set no response handler for mock server, effecively blackhole requests - - connect({ host: '240.0.0.1' }, cancellationToken, (err, conn) => { - expect(err).to.exist; - expect(err).to.match(/connection establishment was cancelled/); - expect(conn).to.not.exist; - done(); - }); + it('should allow a cancellaton token', { + metadata: { requires: { os: '!win32' } }, + test: function(done) { + const cancellationToken = new EventEmitter(); + setTimeout(() => cancellationToken.emit('cancel'), 500); + // set no response handler for mock server, effecively blackhole requests + + connect({ host: '240.0.0.1' }, cancellationToken, (err, conn) => { + expect(err).to.exist; + expect(err).to.match(/connection establishment was cancelled/); + expect(conn).to.not.exist; + done(); + }); + } }); describe('runCommand', function() {