From 27f207582aec390aadebcc4ec0dabf77df78c003 Mon Sep 17 00:00:00 2001 From: agirbal Date: Wed, 25 Jan 2012 19:10:34 -0800 Subject: SERVER-4772: mongo constructor is only local if executed on server --- jstests/slowNightly/dur_big_atomic_update.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'jstests/slowNightly') diff --git a/jstests/slowNightly/dur_big_atomic_update.js b/jstests/slowNightly/dur_big_atomic_update.js index 800b4b831fb..457dbca9a27 100644 --- a/jstests/slowNightly/dur_big_atomic_update.js +++ b/jstests/slowNightly/dur_big_atomic_update.js @@ -12,7 +12,7 @@ for (var i=0; i<1024; i++){ d.foo.insert({_id:i}); } -big_string = 'x'; +big_string = 'xxxxxxxxxxxxxxxx'; while (big_string.length < 1024*1024) { big_string += big_string; } @@ -31,9 +31,9 @@ for (var i=0; i<1024; i++){ // Do it again but in a db.eval d.eval( - function(host, big_string) { - new Mongo(host).getDB("test").foo.update({}, {$set: {big_string: big_string}}, false, /*multi*/true) - }, conn.host, big_string); // Can't pass in connection or DB objects + function(big_string) { + new Mongo().getDB("test").foo.update({}, {$set: {big_string: big_string}}, false, /*multi*/true) + }, big_string); // Can't pass in connection or DB objects err = d.getLastErrorObj(); -- cgit v1.2.1