From a122ca823186ad7dc348b973929c341996a249ab Mon Sep 17 00:00:00 2001 From: emadum Date: Thu, 5 Nov 2020 10:48:36 -0500 Subject: [PATCH] test: restrict geoSearch tests to mongodb <= 4.4 --- test/functional/operation_example.test.js | 2 +- test/functional/operation_generators_example.test.js | 2 +- test/functional/operation_promises_example.test.js | 2 +- test/functional/readconcern.test.js | 7 +++++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/test/functional/operation_example.test.js b/test/functional/operation_example.test.js index 86d85fa4f7..e874267a84 100644 --- a/test/functional/operation_example.test.js +++ b/test/functional/operation_example.test.js @@ -1754,7 +1754,7 @@ describe('Operation Examples', function() { * @ignore */ it('shouldCorrectlyPerformSimpleGeoHaystackSearchCommand', { - metadata: { requires: { topology: ['single', 'replicaset'] } }, + metadata: { requires: { mongodb: '<=4.4', topology: ['single', 'replicaset'] } }, // The actual test we wish to run test: function(done) { diff --git a/test/functional/operation_generators_example.test.js b/test/functional/operation_generators_example.test.js index 30a144d756..f3d9637715 100644 --- a/test/functional/operation_generators_example.test.js +++ b/test/functional/operation_generators_example.test.js @@ -1093,7 +1093,7 @@ describe('Operation (Generators)', function() { * @ignore */ it('shouldCorrectlyPerformSimpleGeoHaystackSearchCommandWithGenerators', { - metadata: { requires: { generators: true, topology: ['single'] } }, + metadata: { requires: { mongodb: '<=4.4', generators: true, topology: ['single'] } }, // The actual test we wish to run test: function() { diff --git a/test/functional/operation_promises_example.test.js b/test/functional/operation_promises_example.test.js index 8c14dc7a94..f88d9d2b01 100644 --- a/test/functional/operation_promises_example.test.js +++ b/test/functional/operation_promises_example.test.js @@ -1120,7 +1120,7 @@ describe('Operation (Promises)', function() { * @ignore */ it('shouldCorrectlyPerformSimpleGeoHaystackSearchCommandWithPromises', { - metadata: { requires: { topology: ['single', 'replicaset'] } }, + metadata: { requires: { mongodb: '<=4.4', topology: ['single', 'replicaset'] } }, // The actual test we wish to run test: function() { diff --git a/test/functional/readconcern.test.js b/test/functional/readconcern.test.js index 48d1b704af..b4a7a37f2f 100644 --- a/test/functional/readconcern.test.js +++ b/test/functional/readconcern.test.js @@ -59,9 +59,12 @@ describe('ReadConcern', function() { ]; tests.forEach(test => { + const metadata = { requires: { topology: 'replicaset', mongodb: '>= 3.2' } }; + if (test.commandName === 'geoSearch') { + metadata.requires.mongodb += ' <=4.4'; + } it(test.description, { - metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } }, - + metadata, test: function(done) { const started = []; const succeeded = [];