summaryrefslogtreecommitdiff
path: root/jstests/core
diff options
context:
space:
mode:
authorYunhe (John) Wang <yunhe.wang@mongodb.com>2015-09-14 15:09:17 -0400
committerYunhe (John) Wang <yunhe.wang@mongodb.com>2015-09-16 11:31:55 -0400
commit33e1ddbb9f69d2a2551246caf38448181e1c6b1f (patch)
treef096a84b2856cae22860c512d65728a55914e728 /jstests/core
parent9d3f497c34f5c63339fd1d4c7c0bdcafc9455c4d (diff)
downloadmongo-33e1ddbb9f69d2a2551246caf38448181e1c6b1f.tar.gz
SERVER-8653 Unblacklisted update_setOnInsert.js
Diffstat (limited to 'jstests/core')
-rw-r--r--jstests/core/update_setOnInsert.js12
1 files changed, 0 insertions, 12 deletions
diff --git a/jstests/core/update_setOnInsert.js b/jstests/core/update_setOnInsert.js
index ab0b8d51d94..4f53d0311b5 100644
--- a/jstests/core/update_setOnInsert.js
+++ b/jstests/core/update_setOnInsert.js
@@ -2,14 +2,6 @@
t = db.update_setOnInsert;
var res;
-db.setProfilingLevel( 2 );
-
-function getLastOp() {
- var cursor = db.system.profile.find( { ns : t.getFullName() , op : "update" } );
- cursor = cursor.sort( { $natural : -1 } ).limit(1);
- return cursor[0];
-}
-
function dotest( useIndex ) {
t.drop();
if ( useIndex ) {
@@ -23,14 +15,11 @@ function dotest( useIndex ) {
t.update( { _id: 5 }, { $inc : { x: 2 }, $setOnInsert : { a : 3 } }, true );
assert.docEq( { _id : 5, a: 4, x : 4 }, t.findOne() );
-
- op = getLastOp();
}
dotest( false );
dotest( true );
-
// Cases for SERVER-9958 -- Allow _id $setOnInsert during insert (if upsert:true, and not doc found)
t.drop();
@@ -42,4 +31,3 @@ assert.writeError(res, "$setOnInsert _id.a/b worked" );
res = t.update( {"_id.a": 4} , { $setOnInsert: { "_id": {a:4, b:1} } } , true );
assert.writeError(res, "$setOnInsert _id.a/a+b worked" );
-db.setProfilingLevel( 0 );