Skip to content

Commit

Permalink
test(cursor): only make session assertions when testing against 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
daprahamian authored and mbroadst committed Mar 19, 2018
1 parent 43a998f commit a04879a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/functional/cursor_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2382,9 +2382,7 @@ describe('Cursor', function() {
if (err != null) {
// Even though cursor is exhausted, should not close session
// // unless cursor is manually closed, due to awaitdata / tailable
test.equal(client.topology.s.sessions.length, 1);
cursor.close();
test.equal(client.topology.s.sessions.length, 0);
client.close();
done();
}
Expand Down Expand Up @@ -2474,10 +2472,7 @@ describe('Cursor', function() {
if (err != null) {
// Even though cursor is exhausted, should not close session
// unless cursor is manually closed, due to awaitdata / tailable
test.equal(client.topology.s.sessions.length, 1);
cursor.close();
test.equal(client.topology.s.sessions.length, 0);

client.close();
done();
} else {
Expand Down Expand Up @@ -4323,7 +4318,10 @@ describe('Cursor', function() {
'should return implicit session to pool when client-side cursor exhausts results on initial query',
{
metadata: {
requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] }
requires: {
topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'],
mongodb: '>=3.6.0'
}
},
test: function(done) {
const configuration = this.configuration;
Expand Down Expand Up @@ -4354,7 +4352,10 @@ describe('Cursor', function() {
'should return implicit session to pool when client-side cursor exhausts results after a getMore',
{
metadata: {
requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] }
requires: {
topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'],
mongodb: '>=3.6.0'
}
},
test: function(done) {
const configuration = this.configuration;
Expand Down

0 comments on commit a04879a

Please sign in to comment.