diff options
author | Benety Goh <benety@mongodb.com> | 2021-06-11 04:29:18 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-11 08:52:12 +0000 |
commit | 7d8f78bc8c308f4ac9e24da3714e1cf4b554b95f (patch) | |
tree | f0681f24037afc8694d34dad58e17042decf24c7 | |
parent | b962214f9061c94078f6195e80b7109e8f2552f8 (diff) | |
download | mongo-7d8f78bc8c308f4ac9e24da3714e1cf4b554b95f.tar.gz |
SERVER-56265 test checks for clustered index support before verifying support for text indexes on time-series collections
-rw-r--r-- | jstests/core/timeseries/timeseries_text_geonear_disallowed.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/jstests/core/timeseries/timeseries_text_geonear_disallowed.js b/jstests/core/timeseries/timeseries_text_geonear_disallowed.js index 5c038066762..be0eb8bcd7c 100644 --- a/jstests/core/timeseries/timeseries_text_geonear_disallowed.js +++ b/jstests/core/timeseries/timeseries_text_geonear_disallowed.js @@ -8,7 +8,6 @@ * does_not_support_stepdowns, * requires_fcv_50, * requires_timeseries, - * requires_wiredtiger, * ] */ @@ -79,8 +78,12 @@ assert.commandFailedWithCode( // $text // Text indices are disallowed on collections clustered by _id. -assert.commandFailedWithCode(tsColl.createIndex({"tags.descr": "text"}), ErrorCodes.InvalidOptions); -// Since a Text index can't be created, a $text query should fail due to a missing index. -assert.commandFailedWithCode(assert.throws(() => tsColl.find({$text: {$search: "1"}}).itcount()), - ErrorCodes.IndexNotFound); +if (TimeseriesTest.supportsClusteredIndexes(db.getMongo())) { + assert.commandFailedWithCode(tsColl.createIndex({"tags.descr": "text"}), + ErrorCodes.InvalidOptions); + // Since a Text index can't be created, a $text query should fail due to a missing index. + assert.commandFailedWithCode( + assert.throws(() => tsColl.find({$text: {$search: "1"}}).itcount()), + ErrorCodes.IndexNotFound); +} })(); |