Skip to content

chore(ci): skip broken windows tests, idle timeout, colors #2629

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

Merged
merged 14 commits into from
Nov 24, 2020
Merged
1 change: 1 addition & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ functions:
type: test
params:
working_dir: src
timeout_secs: 60
script: |
${PREPARE_SHELL}

Expand Down
1 change: 1 addition & 0 deletions .evergreen/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ functions:
type: test
params:
working_dir: "src"
timeout_secs: 60
script: |
${PREPARE_SHELL}

Expand Down
27 changes: 15 additions & 12 deletions test/functional/cmap/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
8 changes: 4 additions & 4 deletions test/functional/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 4 additions & 2 deletions test/functional/core/rs_mocks/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ describe('ReplSet Connection Tests (mocks)', function() {
metadata: {
requires: {
generators: true,
topology: 'single'
topology: 'single',
os: '!win32'
}
},

Expand Down Expand Up @@ -375,7 +376,8 @@ describe('ReplSet Connection Tests (mocks)', function() {
metadata: {
requires: {
generators: true,
topology: 'single'
topology: 'single',
os: '!win32'
}
},

Expand Down
5 changes: 4 additions & 1 deletion test/functional/cursor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/functional/mongo_client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
--file test/tools/runner
--ui test/tools/runner/metadata_ui.js
--reporter spec-xunit-file
--color
25 changes: 14 additions & 11 deletions test/unit/core/connect.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down