diff options
Diffstat (limited to 'jstests/core/updatej.js')
-rw-r--r-- | jstests/core/updatej.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/jstests/core/updatej.js b/jstests/core/updatej.js index 2c4f6246f11..b96233f448d 100644 --- a/jstests/core/updatej.js +++ b/jstests/core/updatej.js @@ -1,7 +1,9 @@ -// @tags: [requires_non_retryable_writes] - // Test that update validation failure terminates the update without modifying subsequent // documents. SERVER-4779 +// This test uses a multi-update, which is not retryable. The behavior it is testing is also not +// true of sharded clusters, since one shard may continue applying updates while the other +// encounters an error. +// @tags: [requires_non_retryable_writes, assumes_unsharded_collection] t = db.jstests_updatej; t.drop(); @@ -10,5 +12,5 @@ t.save({a: []}); t.save({a: 1}); t.save({a: []}); -t.update({}, {$push: {a: 2}}, false, true); +assert.writeError(t.update({}, {$push: {a: 2}}, false, true)); assert.eq(1, t.count({a: 2})); |