summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/read_concern_helper.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/read_concern_helper.js')
-rw-r--r--jstests/noPassthrough/read_concern_helper.js42
1 files changed, 21 insertions, 21 deletions
diff --git a/jstests/noPassthrough/read_concern_helper.js b/jstests/noPassthrough/read_concern_helper.js
index b83b48bdf34..d8cb159b0c7 100644
--- a/jstests/noPassthrough/read_concern_helper.js
+++ b/jstests/noPassthrough/read_concern_helper.js
@@ -1,27 +1,27 @@
// This tests readConcern handling for the find/findOne shell helpers.
// @tags: [requires_majority_read_concern]
(function() {
- "use strict";
- var testServer = MongoRunner.runMongod();
- if (!testServer.getDB('admin').serverStatus().storageEngine.supportsCommittedReads) {
- jsTest.log("skipping test since storage engine doesn't support committed reads");
- MongoRunner.stopMongod(testServer);
- return;
- }
- var coll = testServer.getDB("test").readMajority;
+"use strict";
+var testServer = MongoRunner.runMongod();
+if (!testServer.getDB('admin').serverStatus().storageEngine.supportsCommittedReads) {
+ jsTest.log("skipping test since storage engine doesn't support committed reads");
+ MongoRunner.stopMongod(testServer);
+ return;
+}
+var coll = testServer.getDB("test").readMajority;
- assert.doesNotThrow(function() {
- coll.find({_id: "foo"}).readConcern("majority").itcount();
- });
- assert.doesNotThrow(function() {
- coll.findOne({_id: "foo"}, {}, {}, "majority");
- });
- assert.doesNotThrow(function() {
- coll.count({_id: "foo"}, {readConcern: "majority"});
- });
- assert.doesNotThrow(function() {
- coll.find({_id: "foo"}).readConcern("majority").count();
- });
+assert.doesNotThrow(function() {
+ coll.find({_id: "foo"}).readConcern("majority").itcount();
+});
+assert.doesNotThrow(function() {
+ coll.findOne({_id: "foo"}, {}, {}, "majority");
+});
+assert.doesNotThrow(function() {
+ coll.count({_id: "foo"}, {readConcern: "majority"});
+});
+assert.doesNotThrow(function() {
+ coll.find({_id: "foo"}).readConcern("majority").count();
+});
- MongoRunner.stopMongod(testServer);
+MongoRunner.stopMongod(testServer);
}());