summaryrefslogtreecommitdiff
path: root/jstests/core/repair_server12955.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/repair_server12955.js')
-rw-r--r--jstests/core/repair_server12955.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/jstests/core/repair_server12955.js b/jstests/core/repair_server12955.js
index ce0ffa9d11e..9e586454d10 100644
--- a/jstests/core/repair_server12955.js
+++ b/jstests/core/repair_server12955.js
@@ -1,15 +1,18 @@
-
mydb = db.getSisterDB("repair_server12955");
-mydb.dropDatabase();
+assert.commandWorked(mydb.dropDatabase());
-mydb.foo.ensureIndex({a: "text"});
-mydb.foo.insert({a: "hello world"});
+assert.commandWorked(mydb.foo.ensureIndex({a: "text"}));
+assert.writeOK(mydb.foo.insert({a: "hello world"}));
-before = mydb.stats().dataFileVersion;
+var res = mydb.stats();
+assert.commandWorked(res);
+before = res.dataFileVersion;
-mydb.repairDatabase();
+assert.commandWorked(mydb.repairDatabase());
-after = mydb.stats().dataFileVersion;
+res = mydb.stats();
+assert.commandWorked(res);
+after = res.dataFileVersion;
assert.eq(before, after);
-mydb.dropDatabase();
+assert.commandWorked(mydb.dropDatabase());