Skip to content

Commit e99d4b2

Browse files
committed
cleanup
1 parent 97ca07f commit e99d4b2

File tree

6 files changed

+16
-24
lines changed

6 files changed

+16
-24
lines changed

lib/core/wireprotocol/query.js

-2
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,8 @@ function prepareFindCommand(server, ns, cmd, cursorState) {
140140
if (cmd.maxTimeMS) findCmd.maxTimeMS = cmd.maxTimeMS;
141141
if (cmd.min) findCmd.min = cmd.min;
142142
if (cmd.max) findCmd.max = cmd.max;
143-
// if (maxWireVersion(server) < 13) {
144143
findCmd.returnKey = cmd.returnKey ? cmd.returnKey : false;
145144
findCmd.showRecordId = cmd.showDiskLoc ? cmd.showDiskLoc : false;
146-
// }
147145
if (cmd.snapshot) findCmd.snapshot = cmd.snapshot;
148146
if (cmd.tailable) findCmd.tailable = cmd.tailable;
149147
if (cmd.oplogReplay) findCmd.oplogReplay = cmd.oplogReplay;

test/functional/apm.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('APM', function() {
161161
}
162162
});
163163

164-
it.skip('should correctly handle cursor.close when no cursor existed', {
164+
it('should correctly handle cursor.close when no cursor existed', {
165165
metadata: { requires: { topology: ['single', 'replicaset'] } },
166166

167167
// The actual test we wish to run

test/functional/change_stream.test.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1984,12 +1984,11 @@ describe('Change Streams', function() {
19841984
});
19851985
});
19861986

1987-
// FIXME(NODE-3191)
1988-
describe.skip('resumeToken', function() {
1987+
describe('resumeToken', function() {
19891988
class MockServerManager {
19901989
constructor(config, commandIterators) {
19911990
this.config = config;
1992-
this.cmdList = new Set(['ismaster', 'endSessions', 'aggregate', 'getMore']);
1991+
this.cmdList = new Set(['ismaster', 'hello', 'endSessions', 'aggregate', 'getMore']);
19931992
this.database = 'test_db';
19941993
this.collection = 'test_coll';
19951994
this.ns = `${this.database}.${this.collection}`;
@@ -2087,6 +2086,10 @@ describe('Change Streams', function() {
20872086
});
20882087
}
20892088

2089+
hello() {
2090+
return this.ismaster();
2091+
}
2092+
20902093
endSessions() {
20912094
return { ok: 1 };
20922095
}

test/functional/connection.test.js

-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ describe('Connection', function() {
222222
*/
223223
function connectionTester(configuration, testName, callback) {
224224
return function(err, client) {
225-
test.ok(client);
226225
var db = client.db(configuration.db);
227226
test.equal(err, null);
228227

test/functional/versioned-api.test.js

+6-15
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,14 @@ const loadSpecTests = require('../spec/index').loadSpecTests;
55
const runUnifiedTest = require('./unified-spec-runner/runner').runUnifiedTest;
66

77
describe('Versioned API', function() {
8-
it.skip('should throw an error if serverApi version is provided via the uri with new parser', {
8+
it('should throw an error if serverApi version is provided via the uri with new parser', {
99
metadata: { topology: 'single' },
10-
test: function() {
10+
test: function(done) {
1111
const client = this.configuration.newClient({ serverApi: '1' }, { useNewUrlParser: true });
12-
client.connect(err =>
13-
expect(err).to.match(/URI cannot contain `serverApi`, it can only be passed to the client/)
14-
);
15-
}
16-
});
17-
18-
it.skip('should throw an error if serverApi version is provided via the uri with old parser', {
19-
metadata: { topology: 'single' },
20-
test: function() {
21-
const client = this.configuration.newClient({ serverApi: '1' }, { useNewUrlParser: false });
22-
client.connect(err =>
23-
expect(err).to.match(/URI cannot contain `serverApi`, it can only be passed to the client/)
24-
);
12+
client.connect(err => {
13+
expect(err).to.match(/URI cannot contain `serverApi`, it can only be passed to the client/);
14+
client.close(done);
15+
});
2516
}
2617
});
2718

test/unit/core/single/sessions.test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,9 @@ describe('Sessions (Single)', function() {
424424
}
425425
});
426426

427-
it('should use the same session for any killCursor issued by a cursor', {
428-
metadata: { requires: { topology: 'single', apiVersion: false } }, // FIXME(NODE-3191)
427+
// FIXME(NODE-3191)
428+
it.skip('should use the same session for any killCursor issued by a cursor', {
429+
metadata: { requires: { topology: 'single' } },
429430
test: function(_done) {
430431
const client = new Server(test.server.address());
431432
const sessionPool = new ServerSessionPool(client);

0 commit comments

Comments
 (0)