summaryrefslogtreecommitdiff
path: root/jstests/multiVersion/collation_downgrade.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/multiVersion/collation_downgrade.js')
-rw-r--r--jstests/multiVersion/collation_downgrade.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/jstests/multiVersion/collation_downgrade.js b/jstests/multiVersion/collation_downgrade.js
index ef454a482e4..75bf1c5f9eb 100644
--- a/jstests/multiVersion/collation_downgrade.js
+++ b/jstests/multiVersion/collation_downgrade.js
@@ -21,12 +21,7 @@
storageEngine: jsTest.options().storageEngine || "wiredTiger",
};
- // Whenever we start "latest", we use the "enableBSON1_1" server parameter to force indices
- // created with the wiredTiger storage engine to use KeyString V0. Otherwise, downgrade will
- // fail due to creating KeyString V1 indices rather than exercising the code which prevents
- // downgrading in the presence of non-simple collations.
- var latestOptions =
- Object.extend({binVersion: "latest", setParameter: "enableBSON1_1=false"}, defaultOptions);
+ var latestOptions = Object.extend({binVersion: "latest"}, defaultOptions);
var downgradeVersion = "3.2";
var downgradeOptions = Object.extend({binVersion: downgradeVersion}, defaultOptions);
@@ -40,6 +35,12 @@
var conn = MongoRunner.runMongod(latestOptions);
assert.neq(null, conn, "mongod was unable to start up with options: " + tojson(latestOptions));
+ // Set featureCompatibilityVersion to 3.2 to force indices created with the wiredTiger storage
+ // engine to use KeyString V0. Otherwise, downgrade will fail due to creating KeyString V1
+ // indices rather than exercising the code which prevents downgrading in the presence of
+ // non-simple collations.
+ assert.commandWorked(conn.getDB("admin").runCommand({setFeatureCompatibilityVersion: "3.2"}));
+
var testDB = conn.getDB("test");
testDB.dropDatabase();
assert.commandWorked(testDB.createCollection("simplecollator"));