summaryrefslogtreecommitdiff
path: root/jstests/gle/updated_existing.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/gle/updated_existing.js')
-rw-r--r--jstests/gle/updated_existing.js18
1 files changed, 8 insertions, 10 deletions
diff --git a/jstests/gle/updated_existing.js b/jstests/gle/updated_existing.js
index 5e9891ccf85..ff485530e35 100644
--- a/jstests/gle/updated_existing.js
+++ b/jstests/gle/updated_existing.js
@@ -3,26 +3,24 @@
* an upsert is not missing when autosplit takes place.
*/
-var st = new ShardingTest({ shards : 1, mongos : 1, verbose : 1, chunkSize: 1 });
+var st = new ShardingTest({shards: 1, mongos: 1, verbose: 1, chunkSize: 1});
var testDB = st.getDB("test");
var coll = "foo";
testDB[coll].drop();
-st.adminCommand({ enablesharding : 'test' });
-st.adminCommand({ shardcollection : 'test.' + coll, key : { "shardkey2" : 1, "shardkey1" : 1 } });
+st.adminCommand({enablesharding: 'test'});
+st.adminCommand({shardcollection: 'test.' + coll, key: {"shardkey2": 1, "shardkey1": 1}});
var bigString = "";
-while ( bigString.length < 1024 * 50 )
+while (bigString.length < 1024 * 50)
bigString += "asocsancdnsjfnsdnfsjdhfasdfasdfasdfnsadofnsadlkfnsaldknfsad";
-
-
for (var i = 0; i < 10000; ++i) {
- testDB[coll].update({ "shardkey1" : "test" + i, "shardkey2" : "test" + i },
- { $set : { "test_upsert": bigString } },
- true, // upsert
- false); // multi
+ testDB[coll].update({"shardkey1": "test" + i, "shardkey2": "test" + i},
+ {$set: {"test_upsert": bigString}},
+ true, // upsert
+ false); // multi
assert.eq(testDB.getLastErrorObj().updatedExisting, false);
}