From 7d8f78bc8c308f4ac9e24da3714e1cf4b554b95f Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Fri, 11 Jun 2021 04:29:18 -0400 Subject: SERVER-56265 test checks for clustered index support before verifying support for text indexes on time-series collections --- .../core/timeseries/timeseries_text_geonear_disallowed.js | 13 ++++++++----- 1 file 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); +} })(); -- cgit v1.2.1