summaryrefslogtreecommitdiff
path: root/jstests/core/batch_write_command_insert.js
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2016-04-07 18:34:44 -0400
committerMathias Stearn <mathias@10gen.com>2016-04-21 18:58:41 -0400
commitd819ac65d1a0f941bd3e201f343ac04e252c4442 (patch)
treea531131c01f3816094d34cd845cfd71aec2e3459 /jstests/core/batch_write_command_insert.js
parenta7a593da31a944c90d7c5f0422eeee8264eb438d (diff)
downloadmongo-d819ac65d1a0f941bd3e201f343ac04e252c4442.tar.gz
SERVER-23128 Refactor mongod write operations
Now both write commands and legacy writes share an implementation.
Diffstat (limited to 'jstests/core/batch_write_command_insert.js')
-rw-r--r--jstests/core/batch_write_command_insert.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/core/batch_write_command_insert.js b/jstests/core/batch_write_command_insert.js
index 6b42cf08ebf..3405785ecce 100644
--- a/jstests/core/batch_write_command_insert.js
+++ b/jstests/core/batch_write_command_insert.js
@@ -285,7 +285,7 @@ request = {
documents: [{ns: "invalid." + coll.getName(), key: {x: 1}, name: "x_1", unique: true}]
};
result = coll.runCommand(request);
-assert(!result.ok, tojson(result));
+assert(!result.ok || (result.n == 0 && result.writeErrors.length == 1), tojson(result));
assert.eq(coll.getIndexes().length, 0);
//
@@ -296,7 +296,7 @@ request = {
documents: [{}]
};
result = coll.runCommand(request);
-assert(!result.ok, tojson(result));
+assert(!result.ok || (result.n == 0 && result.writeErrors.length == 1), tojson(result));
assert.eq(coll.getIndexes().length, 0);
//