diff options
author | Mike Grundy <michael.grundy@10gen.com> | 2016-02-04 12:29:22 -0500 |
---|---|---|
committer | Mike Grundy <michael.grundy@10gen.com> | 2016-02-05 15:00:50 -0500 |
commit | a0997b39c6033dbd1df2f9e32018361fcc25e392 (patch) | |
tree | 4985531683fc6108be1da18efe108d832320f770 /jstests/gle | |
parent | 4bbb7bae4d29e88fcf988aed856f2be4d6fc2439 (diff) | |
download | mongo-a0997b39c6033dbd1df2f9e32018361fcc25e392.tar.gz |
SERVER-22341 fix jslint errors in jstests/gle with eslint --fix
Diffstat (limited to 'jstests/gle')
-rw-r--r-- | jstests/gle/core/gle_shell_server5441.js | 4 | ||||
-rw-r--r-- | jstests/gle/core/remove5.js | 2 | ||||
-rw-r--r-- | jstests/gle/core/update4.js | 2 | ||||
-rw-r--r-- | jstests/gle/gle_sharded_write.js | 2 | ||||
-rw-r--r-- | jstests/gle/opcounters_legacy.js | 38 | ||||
-rw-r--r-- | jstests/gle/sync1.js | 14 | ||||
-rw-r--r-- | jstests/gle/sync4.js | 14 |
7 files changed, 38 insertions, 38 deletions
diff --git a/jstests/gle/core/gle_shell_server5441.js b/jstests/gle/core/gle_shell_server5441.js index 9cf5786aa01..dedb135f20a 100644 --- a/jstests/gle/core/gle_shell_server5441.js +++ b/jstests/gle/core/gle_shell_server5441.js @@ -21,7 +21,7 @@ for ( i=0; i<100; i++ ) { } db.adminCommand( { replSetGetStatus : 1 , forShell : 1 } ); -shellPrintHelper( updateReturn ) -defaultPrompt() +shellPrintHelper( updateReturn ); +defaultPrompt(); checkgle("'final'"); diff --git a/jstests/gle/core/remove5.js b/jstests/gle/core/remove5.js index be4f0b49ec1..6558854264f 100644 --- a/jstests/gle/core/remove5.js +++ b/jstests/gle/core/remove5.js @@ -3,7 +3,7 @@ f.drop(); getLastError = function() { return db.runCommand( { getlasterror : 1 } ); -} +}; f.remove( {} ); assert.eq( 0, getLastError().n ); diff --git a/jstests/gle/core/update4.js b/jstests/gle/core/update4.js index 1502f672a50..3d68dc24916 100644 --- a/jstests/gle/core/update4.js +++ b/jstests/gle/core/update4.js @@ -5,7 +5,7 @@ getLastError = function() { ret = db.runCommand( { getlasterror : 1 } ); // printjson( ret ); return ret; -} +}; f.save( {a:1} ); f.update( {a:1}, {a:2} ); diff --git a/jstests/gle/gle_sharded_write.js b/jstests/gle/gle_sharded_write.js index a78e5564952..cfe3c8f1ad2 100644 --- a/jstests/gle/gle_sharded_write.js +++ b/jstests/gle/gle_sharded_write.js @@ -155,7 +155,7 @@ var query = { $maxDistance : 1000, } } -} +}; printjson(coll.remove(query)); printjson(gle = coll.getDB().runCommand({ getLastError : 1 })); assert(gle.ok); diff --git a/jstests/gle/opcounters_legacy.js b/jstests/gle/opcounters_legacy.js index 2742be5f933..7f267fbe155 100644 --- a/jstests/gle/opcounters_legacy.js +++ b/jstests/gle/opcounters_legacy.js @@ -4,7 +4,7 @@ // Remember the global 'db' var var lastDB = db; var mongo = new Mongo(db.getMongo().host); -mongo.writeMode = function() { return "legacy"; } +mongo.writeMode = function() { return "legacy"; }; db = mongo.getDB(db.toString()); var t = db.opcounters; @@ -35,27 +35,27 @@ assert.eq(opCounters.insert + 1, db.serverStatus().opcounters.insert); // Bulk insert, no error. opCounters = db.serverStatus().opcounters; -t.insert([{_id:1},{_id:2}]) +t.insert([{_id:1},{_id:2}]); assert(!db.getLastError()); assert.eq(opCounters.insert + 2, db.serverStatus().opcounters.insert); // Single insert, with error. opCounters = db.serverStatus().opcounters; -t.insert({_id:0}) -print( db.getLastError() ) +t.insert({_id:0}); +print( db.getLastError() ); assert(db.getLastError()); assert.eq(opCounters.insert + (isMongos ? 1 : 0), db.serverStatus().opcounters.insert); // Bulk insert, with error, continueOnError=false. opCounters = db.serverStatus().opcounters; -t.insert([{_id:3},{_id:3},{_id:4}]) +t.insert([{_id:3},{_id:3},{_id:4}]); assert(db.getLastError()); assert.eq(opCounters.insert + (isMongos ? 2 : 1), db.serverStatus().opcounters.insert); // Bulk insert, with error, continueOnError=true. var continueOnErrorFlag = 1; opCounters = db.serverStatus().opcounters; -t.insert([{_id:5},{_id:5},{_id:6}], continueOnErrorFlag) +t.insert([{_id:5},{_id:5},{_id:6}], continueOnErrorFlag); assert(db.getLastError()); assert.eq(opCounters.insert + 2, db.serverStatus().opcounters.insert); @@ -118,7 +118,7 @@ assert.eq(opCounters.query + 1, db.serverStatus().opcounters.query); // Query, with error. opCounters = db.serverStatus().opcounters; -assert.throws(function() { t.findOne({_id:{$invalidOp:1}}) }); +assert.throws(function() { t.findOne({_id:{$invalidOp:1}}); }); assert.eq(opCounters.query + (isMongos ? 0 : 1), db.serverStatus().opcounters.query); // @@ -147,28 +147,28 @@ assert.eq(opCounters.getmore + 1, db.serverStatus().opcounters.getmore); // t.drop(); -t.insert({_id:0}) +t.insert({_id:0}); // Command, recognized, no error. serverStatus = db.runCommand({serverStatus:1}); -opCounters = serverStatus.opcounters -metricsObj = serverStatus.metrics.commands +opCounters = serverStatus.opcounters; +metricsObj = serverStatus.metrics.commands; assert.eq(opCounters.command + 1, db.serverStatus().opcounters.command); // "serverStatus" counted // Count this and the last run of "serverStatus" assert.eq( metricsObj.serverStatus.total + 2, db.serverStatus().metrics.commands.serverStatus.total, - "total ServerStatus command counter did not increment" ) + "total ServerStatus command counter did not increment" ); assert.eq( metricsObj.serverStatus.failed, db.serverStatus().metrics.commands.serverStatus.failed, - "failed ServerStatus command counter incremented!" ) + "failed ServerStatus command counter incremented!" ); // Command, recognized, with error. serverStatus = db.runCommand({serverStatus:1}); -opCounters = serverStatus.opcounters -metricsObj = serverStatus.metrics.commands +opCounters = serverStatus.opcounters; +metricsObj = serverStatus.metrics.commands; var countVal = { "total" : 0, "failed" : 0 }; if (metricsObj.count != null){ - countVal = metricsObj.count + countVal = metricsObj.count; } res = t.runCommand("count", {query:{$invalidOp:1}}); assert.eq(0, res.ok); @@ -177,15 +177,15 @@ assert.eq(opCounters.command + 2, assert.eq( countVal.total +1, db.serverStatus().metrics.commands.count.total, - "total count command counter did not incremented" ) + "total count command counter did not incremented" ); assert.eq( countVal.failed + 1, db.serverStatus().metrics.commands.count.failed, - "failed count command counter did not increment" ) + "failed count command counter did not increment" ); // Command, unrecognized. serverStatus = db.runCommand({serverStatus:1}); -opCounters = serverStatus.opcounters -metricsObj = serverStatus.metrics.commands +opCounters = serverStatus.opcounters; +metricsObj = serverStatus.metrics.commands; res = t.runCommand("invalid"); assert.eq(0, res.ok); assert.eq(opCounters.command + 1, db.serverStatus().opcounters.command); // "serverStatus" counted diff --git a/jstests/gle/sync1.js b/jstests/gle/sync1.js index c840ff8fac5..d370c53f949 100644 --- a/jstests/gle/sync1.js +++ b/jstests/gle/sync1.js @@ -11,12 +11,12 @@ if (test.conn.writeMode() == 'commands') { } else { - db = test.conn.getDB( "test" ) - t = db.sync1 - t.save( { x : 1 } ) + db = test.conn.getDB( "test" ); + t = db.sync1; + t.save( { x : 1 } ); assert.eq( 1 , t.find().itcount() , "A1" ); assert.eq( 1 , t.find().count() , "A2" ); - t.save( { x : 2 } ) + t.save( { x : 2 } ); assert.eq( 2 , t.find().itcount() , "A3" ); assert.eq( 2 , t.find().count() , "A4" ); @@ -45,15 +45,15 @@ else { assert.eq( 2 , t.find().itcount() , "C1" ); assert.soon( function(){ try { - t.remove( { x : 1 } ) + t.remove( { x : 1 } ); return true; } catch ( e ){ print( e ); } return false; - } ) - t.find().forEach( printjson ) + } ); + t.find().forEach( printjson ); assert.eq( 1 , t.find().itcount() , "C2" ); test.stop(); diff --git a/jstests/gle/sync4.js b/jstests/gle/sync4.js index b6b1a777856..a33f9b8a132 100644 --- a/jstests/gle/sync4.js +++ b/jstests/gle/sync4.js @@ -1,24 +1,24 @@ // TODO: remove test after we deprecate SyncClusterConnection -test = new SyncCCTest( "sync4" ) +test = new SyncCCTest( "sync4" ); if (test.conn.writeMode() == 'commands') { jsTest.log('Skipping test not compatible with write commands'); } else { - db = test.conn.getDB( "test" ) - t = db.sync4 + db = test.conn.getDB( "test" ); + t = db.sync4; for ( i=0; i<1000; i++ ){ - t.insert( { _id : i , x : "asdasdsdasdas" } ) + t.insert( { _id : i , x : "asdasdsdasdas" } ); } db.getLastError(); test.checkHashes( "test" , "A0" ); - assert.eq( 1000 , t.find().count() , "A1" ) - assert.eq( 1000 , t.find().itcount() , "A2" ) - assert.eq( 1000 , t.find().snapshot().batchSize(10).itcount() , "A2" ) + assert.eq( 1000 , t.find().count() , "A1" ); + assert.eq( 1000 , t.find().itcount() , "A2" ); + assert.eq( 1000 , t.find().snapshot().batchSize(10).itcount() , "A2" ); test.stop(); |