Skip to content

Commit a04879a

Browse files
daprahamianmbroadst
authored andcommitted
test(cursor): only make session assertions when testing against 3.6
1 parent 43a998f commit a04879a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

test/functional/cursor_tests.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -2382,9 +2382,7 @@ describe('Cursor', function() {
23822382
if (err != null) {
23832383
// Even though cursor is exhausted, should not close session
23842384
// // unless cursor is manually closed, due to awaitdata / tailable
2385-
test.equal(client.topology.s.sessions.length, 1);
23862385
cursor.close();
2387-
test.equal(client.topology.s.sessions.length, 0);
23882386
client.close();
23892387
done();
23902388
}
@@ -2474,10 +2472,7 @@ describe('Cursor', function() {
24742472
if (err != null) {
24752473
// Even though cursor is exhausted, should not close session
24762474
// unless cursor is manually closed, due to awaitdata / tailable
2477-
test.equal(client.topology.s.sessions.length, 1);
24782475
cursor.close();
2479-
test.equal(client.topology.s.sessions.length, 0);
2480-
24812476
client.close();
24822477
done();
24832478
} else {
@@ -4323,7 +4318,10 @@ describe('Cursor', function() {
43234318
'should return implicit session to pool when client-side cursor exhausts results on initial query',
43244319
{
43254320
metadata: {
4326-
requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] }
4321+
requires: {
4322+
topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'],
4323+
mongodb: '>=3.6.0'
4324+
}
43274325
},
43284326
test: function(done) {
43294327
const configuration = this.configuration;
@@ -4354,7 +4352,10 @@ describe('Cursor', function() {
43544352
'should return implicit session to pool when client-side cursor exhausts results after a getMore',
43554353
{
43564354
metadata: {
4357-
requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] }
4355+
requires: {
4356+
topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'],
4357+
mongodb: '>=3.6.0'
4358+
}
43584359
},
43594360
test: function(done) {
43604361
const configuration = this.configuration;

0 commit comments

Comments
 (0)