From 82b0f9daefd9debf8a4bafcb9565ebb772d4c684 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Sun, 29 Mar 2009 09:14:38 -0400 Subject: [PATCH] debugging --- jstests/sharding/shard2.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jstests/sharding/shard2.js b/jstests/sharding/shard2.js index 2332ecb19de..f6f3dec3cc2 100644 --- a/jstests/sharding/shard2.js +++ b/jstests/sharding/shard2.js @@ -144,24 +144,24 @@ assert.eq( 6 , countCursor( db.foo.find().limit(1)._exec() ) , "getMore 3" ); // update person = db.foo.findOne( { num : 3 } ); -assert.eq( "bob" , person.name ); +assert.eq( "bob" , person.name , "update setup 1" ); person.name = "bob is gone"; db.foo.update( { num : 3 } , person ); person = db.foo.findOne( { num : 3 } ); -assert.eq( "bob is gone" , person.name ); +assert.eq( "bob is gone" , person.name , "update test B" ); // remove -assert( db.foo.findOne( { num : 3 } ) != null ); +assert( db.foo.findOne( { num : 3 } ) != null , "remove test A" ); db.foo.remove( { num : 3 } ); -assert( db.foo.findOne( { num : 3 } ) == null ); +assert( db.foo.findOne( { num : 3 } ) == null , "remove test B" ); db.foo.save( { num : 3 , name : "eliot2" } ); person = db.foo.findOne( { num : 3 } ); -assert( person ); -assert( person.name == "eliot2" ); +assert( person , "remove test C" ); +assert.eq( person.name , "eliot2" ); db.foo.remove( { _id : person._id } ); -assert( db.foo.findOne( { num : 3 } ) == null ); +assert( db.foo.findOne( { num : 3 } ) == null , "remove test E - should have been null - not: " + tojson( db.foo.findOne( { num : 3 } ) ) ); placeCheck( 8 );