Skip to content

Commit c878b3a

Browse files
committed
test(read-concern): don't test read concern tests against < 3.2
1 parent eea58ed commit c878b3a

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

test/functional/readconcern_tests.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('ReadConcern', function() {
2222
});
2323

2424
it('Should set local readConcern on db level', {
25-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 2.4.X' } },
25+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
2626

2727
test: function(done) {
2828
var listener = require('../..').instrument(function(err) {
@@ -68,7 +68,7 @@ describe('ReadConcern', function() {
6868
});
6969

7070
it('Should set majority readConcern on db level', {
71-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.1.7' } },
71+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
7272

7373
test: function(done) {
7474
var listener = require('../..').instrument(function(err) {
@@ -114,7 +114,7 @@ describe('ReadConcern', function() {
114114
});
115115

116116
it('Should set local readConcern at collection level', {
117-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 2.4.X' } },
117+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
118118

119119
test: function(done) {
120120
var listener = require('../..').instrument(function(err) {
@@ -157,7 +157,7 @@ describe('ReadConcern', function() {
157157
});
158158

159159
it('Should set majority readConcern at collection level', {
160-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.1.7' } },
160+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
161161

162162
test: function(done) {
163163
var listener = require('../..').instrument(function(err) {
@@ -203,7 +203,7 @@ describe('ReadConcern', function() {
203203
});
204204

205205
it('Should set local readConcern using MongoClient', {
206-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 2.4.X' } },
206+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
207207

208208
test: function(done) {
209209
var configuration = this.configuration;
@@ -251,7 +251,7 @@ describe('ReadConcern', function() {
251251
});
252252

253253
it('Should set majority readConcern using MongoClient', {
254-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.1.7' } },
254+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
255255

256256
test: function(done) {
257257
var configuration = this.configuration;
@@ -299,7 +299,7 @@ describe('ReadConcern', function() {
299299
});
300300

301301
it('Should set majority readConcern using MongoClient with options', {
302-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.1.7' } },
302+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
303303

304304
test: function(done) {
305305
var configuration = this.configuration;
@@ -382,7 +382,8 @@ describe('ReadConcern', function() {
382382

383383
// Execute find
384384
collection.find().toArray(function(err) {
385-
test.equal(null, err);
385+
expect(err).to.exist;
386+
386387
listener.uninstrument();
387388
client.close();
388389
done();
@@ -392,7 +393,7 @@ describe('ReadConcern', function() {
392393
});
393394

394395
it('Should set majority readConcern aggregate command', {
395-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2.0' } },
396+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
396397

397398
test: function(done) {
398399
var listener = require('../..').instrument(function(err) {
@@ -445,7 +446,7 @@ describe('ReadConcern', function() {
445446
});
446447

447448
it('Should set majority readConcern aggregate command but ignore due to out', {
448-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2.0' } },
449+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
449450

450451
test: function(done) {
451452
var listener = require('../..').instrument(function(err) {
@@ -511,7 +512,7 @@ describe('ReadConcern', function() {
511512
});
512513

513514
it('Should set majority readConcern mapReduce command but be ignored', {
514-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2.0' } },
515+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
515516

516517
test: function(done) {
517518
var listener = require('../..').instrument(function(err) {
@@ -575,7 +576,7 @@ describe('ReadConcern', function() {
575576
});
576577

577578
it('Should set majority readConcern distinct command', {
578-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2.0' } },
579+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
579580

580581
test: function(done) {
581582
var listener = require('../..').instrument(function(err) {
@@ -642,7 +643,7 @@ describe('ReadConcern', function() {
642643
});
643644

644645
it('Should set majority readConcern count command', {
645-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2.0' } },
646+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
646647

647648
test: function(done) {
648649
var listener = require('../..').instrument(function(err) {
@@ -709,7 +710,7 @@ describe('ReadConcern', function() {
709710
});
710711

711712
it('Should set majority readConcern group command', {
712-
metadata: { requires: { topology: 'replicaset', mongodb: '>=3.2.0 <=4.1.0' } },
713+
metadata: { requires: { topology: 'replicaset', mongodb: '>=3.2 <=4.1.0' } },
713714

714715
test: function(done) {
715716
var listener = require('../..').instrument(function(err) {
@@ -782,7 +783,7 @@ describe('ReadConcern', function() {
782783
});
783784

784785
it('Should set majority readConcern parallelCollectionScan command', {
785-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2.0 <=4.1.0' } },
786+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2 <=4.1.0' } },
786787

787788
test: function(done) {
788789
var listener = require('../..').instrument(function(err) {
@@ -849,7 +850,7 @@ describe('ReadConcern', function() {
849850
});
850851

851852
it('Should set majority readConcern geoSearch command', {
852-
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2.0' } },
853+
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },
853854

854855
test: function(done) {
855856
var listener = require('../..').instrument(function(err) {

0 commit comments

Comments
 (0)