summaryrefslogtreecommitdiff
path: root/jstests/repl/basic1.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-05-27 11:39:48 -0400
committerEliot Horowitz <eliot@10gen.com>2010-05-27 11:39:48 -0400
commitd5e520ff7c7b73f7bfc2dda61f68bb79ffff0dc7 (patch)
treed0239136fe196316536523128db9f5b75262d241 /jstests/repl/basic1.js
parentaa3e6e29afc8b9ed3548d2c631eae4f8b7d41710 (diff)
downloadmongo-d5e520ff7c7b73f7bfc2dda61f68bb79ffff0dc7.tar.gz
fix replication with multiple $inc SERVER-1161
Diffstat (limited to 'jstests/repl/basic1.js')
-rw-r--r--jstests/repl/basic1.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/jstests/repl/basic1.js b/jstests/repl/basic1.js
index 1b8a56c69fe..79a921a2bf4 100644
--- a/jstests/repl/basic1.js
+++ b/jstests/repl/basic1.js
@@ -109,19 +109,21 @@ printjson( as.rpos.findOne() )
//am.getSisterDB( "local" ).getCollection( "oplog.$main" ).find().limit(10).sort( { $natural : -1 } ).forEach( printjson )
t = am.b;
-t.update( { "_id" : "fun"}, { $inc : {"ws.fs.cp.wsj" : 6743} } , true, false)
+t.update( { "_id" : "fun"}, { $inc : {"a.b.c.x" : 6743} } , true, false)
block()
check( "b 1" );
-t.update( { "_id" : "fun"}, { $inc : {"ws.fs.cp.wsj" : 5} } , true, false)
+t.update( { "_id" : "fun"}, { $inc : {"a.b.c.x" : 5} } , true, false)
block()
check( "b 2" );
-t.update( { "_id" : "fun"}, { $inc : {"ws.fs.cp.wsj" : 100, "ws.fs.cp.forbes" : 911} } , true, false)
+t.update( { "_id" : "fun"}, { $inc : {"a.b.c.x" : 100, "a.b.c.y" : 911} } , true, false)
block()
-printjson( t.findOne() )
-printjson( as.b.findOne() )
-//check( "b 3" );
+assert.eq( { _id : "fun" , a : { b : { c : { x : 6848 , y : 911 } } } } , as.b.findOne() , "b 3" );
+//printjson( t.findOne() )
+//printjson( as.b.findOne() )
+//am.getSisterDB( "local" ).getCollection( "oplog.$main" ).find().sort( { $natural : -1 } ).limit(3).forEach( printjson )
+check( "b 4" );