Skip to content

Commit 1f19f8f

Browse files
authored
chore(ci): skip broken windows tests, idle timeout, colors (#2629)
1 parent dd356f0 commit 1f19f8f

File tree

9 files changed

+45
-31
lines changed

9 files changed

+45
-31
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ functions:
101101
type: test
102102
params:
103103
working_dir: src
104+
timeout_secs: 60
104105
script: |
105106
${PREPARE_SHELL}
106107

.evergreen/config.yml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ functions:
121121
type: test
122122
params:
123123
working_dir: "src"
124+
timeout_secs: 60
124125
script: |
125126
${PREPARE_SHELL}
126127

test/functional/cmap/connection.test.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,22 @@ describe('Connection', function() {
6161
});
6262
});
6363

64-
it('should support socket timeouts', function(done) {
65-
const connectOptions = Object.assign({
66-
host: '240.0.0.1',
67-
connectionType: Connection,
68-
bson: new BSON(),
69-
connectionTimeout: 500
70-
});
64+
it('should support socket timeouts', {
65+
metadata: { requires: { os: '!win32' } },
66+
test: function(done) {
67+
const connectOptions = Object.assign({
68+
host: '240.0.0.1',
69+
connectionType: Connection,
70+
bson: new BSON(),
71+
connectionTimeout: 500
72+
});
7173

72-
connect(connectOptions, err => {
73-
expect(err).to.exist;
74-
expect(err).to.match(/timed out/);
75-
done();
76-
});
74+
connect(connectOptions, err => {
75+
expect(err).to.exist;
76+
expect(err).to.match(/timed out/);
77+
done();
78+
});
79+
}
7780
});
7881

7982
it('should support calling back multiple times on exhaust commands', {

test/functional/connection.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('Connection', function() {
1212
* @ignore
1313
*/
1414
it('should correctly start monitoring for single server connection', {
15-
metadata: { requires: { topology: 'single' } },
15+
metadata: { requires: { topology: 'single', os: '!win32' } },
1616

1717
// The actual test we wish to run
1818
test: function(done) {
@@ -36,7 +36,7 @@ describe('Connection', function() {
3636
* @ignore
3737
*/
3838
it('should correctly disable monitoring for single server connection', {
39-
metadata: { requires: { topology: 'single' } },
39+
metadata: { requires: { topology: 'single', os: '!win32' } },
4040

4141
// The actual test we wish to run
4242
test: function(done) {
@@ -64,7 +64,7 @@ describe('Connection', function() {
6464
* @ignore
6565
*/
6666
it('should correctly connect to server using domain socket', {
67-
metadata: { requires: { topology: 'single' } },
67+
metadata: { requires: { topology: 'single', os: '!win32' } },
6868

6969
// The actual test we wish to run
7070
test: function(done) {
@@ -161,7 +161,7 @@ describe('Connection', function() {
161161
* @ignore
162162
*/
163163
it('should connect to server using domain socket with undefined port', {
164-
metadata: { requires: { topology: 'single' } },
164+
metadata: { requires: { topology: 'single', os: '!win32' } },
165165

166166
// The actual test we wish to run
167167
test: function(done) {

test/functional/core/rs_mocks/connection.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ describe('ReplSet Connection Tests (mocks)', function() {
267267
metadata: {
268268
requires: {
269269
generators: true,
270-
topology: 'single'
270+
topology: 'single',
271+
os: '!win32'
271272
}
272273
},
273274

@@ -375,7 +376,8 @@ describe('ReplSet Connection Tests (mocks)', function() {
375376
metadata: {
376377
requires: {
377378
generators: true,
378-
topology: 'single'
379+
topology: 'single',
380+
os: '!win32'
379381
}
380382
},
381383

test/functional/cursor.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,10 @@ describe('Cursor', function() {
22162216
// Add a tag that our runner can trigger on
22172217
// in this case we are setting that node needs to be higher than 0.10.X to run
22182218
metadata: {
2219-
requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] }
2219+
requires: {
2220+
topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'],
2221+
os: '!win32'
2222+
}
22202223
},
22212224

22222225
// The actual test we wish to run

test/functional/mongo_client.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ describe('MongoClient', function() {
487487
});
488488

489489
it('should correctly connect to mongodb using domain socket', {
490-
metadata: { requires: { topology: ['single'] } },
490+
metadata: { requires: { topology: ['single'], os: '!win32' } },
491491

492492
// The actual test we wish to run
493493
test: function(done) {

test/mocha.opts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
--file test/tools/runner
44
--ui test/tools/runner/metadata_ui.js
55
--reporter spec-xunit-file
6+
--color

test/unit/core/connect.test.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,20 @@ describe('Connect Tests', function() {
100100
});
101101
});
102102

103-
it('should allow a cancellaton token', function(done) {
104-
const cancellationToken = new EventEmitter();
105-
setTimeout(() => cancellationToken.emit('cancel'), 500);
106-
// set no response handler for mock server, effecively blackhole requests
107-
108-
connect({ host: '240.0.0.1' }, cancellationToken, (err, conn) => {
109-
expect(err).to.exist;
110-
expect(err).to.match(/connection establishment was cancelled/);
111-
expect(conn).to.not.exist;
112-
done();
113-
});
103+
it('should allow a cancellaton token', {
104+
metadata: { requires: { os: '!win32' } },
105+
test: function(done) {
106+
const cancellationToken = new EventEmitter();
107+
setTimeout(() => cancellationToken.emit('cancel'), 500);
108+
// set no response handler for mock server, effecively blackhole requests
109+
110+
connect({ host: '240.0.0.1' }, cancellationToken, (err, conn) => {
111+
expect(err).to.exist;
112+
expect(err).to.match(/connection establishment was cancelled/);
113+
expect(conn).to.not.exist;
114+
done();
115+
});
116+
}
114117
});
115118

116119
describe('runCommand', function() {

0 commit comments

Comments
 (0)