summaryrefslogtreecommitdiff
path: root/jstests/repl/basic1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/repl/basic1.js')
-rw-r--r--jstests/repl/basic1.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/repl/basic1.js b/jstests/repl/basic1.js
index 5a7dacec6af..701d71e4d65 100644
--- a/jstests/repl/basic1.js
+++ b/jstests/repl/basic1.js
@@ -141,6 +141,14 @@ assert.soon( function(){ return am.lotOfIndexes.getIndexes().length == as.lotOfI
assert.eq( am.lotOfIndexes.getIndexes().length , as.lotOfIndexes.getIndexes().length , "lots of indexes b" )
+// multi-update with $inc
+
+am.mu1.update( { _id : 1 , $atomic : 1 } , { $inc : { x : 1 } } , true , true )
+x = { _id : 1 , x : 1 }
+assert.eq( x , am.mu1.findOne() , "mu1" );
+assert.soon( function(){ z = as.mu1.findOne(); printjson( z ); return friendlyEqual( x , z ); } , "mu2" )
+
+
rt.stop();