diff options
author | Mike Grundy <michael.grundy@10gen.com> | 2016-02-04 12:30:13 -0500 |
---|---|---|
committer | Mike Grundy <michael.grundy@10gen.com> | 2016-02-05 15:02:53 -0500 |
commit | 6bf0dcee8a4027d98ef307b267121352fed070c4 (patch) | |
tree | 753f213cb742aa0920310578f91dd12567ed3c0b /jstests/parallel | |
parent | 55b5ad87239ba35e542add1e7402fe775dc19b8e (diff) | |
download | mongo-6bf0dcee8a4027d98ef307b267121352fed070c4.tar.gz |
SERVER-22341 fix jslint errors in jstests/parallel with eslint --fix
Conflicts:
jstests/parallel/manyclients.js
Diffstat (limited to 'jstests/parallel')
-rw-r--r-- | jstests/parallel/allops.js | 2 | ||||
-rw-r--r-- | jstests/parallel/basic.js | 2 | ||||
-rw-r--r-- | jstests/parallel/basicPlus.js | 2 | ||||
-rw-r--r-- | jstests/parallel/checkMultiThread.js | 4 | ||||
-rw-r--r-- | jstests/parallel/del.js | 46 | ||||
-rw-r--r-- | jstests/parallel/insert.js | 2 | ||||
-rw-r--r-- | jstests/parallel/manyclients.js | 4 | ||||
-rw-r--r-- | jstests/parallel/repl.js | 4 | ||||
-rw-r--r-- | jstests/parallel/shellfork.js | 4 | ||||
-rw-r--r-- | jstests/parallel/update_serializability1.js | 2 | ||||
-rw-r--r-- | jstests/parallel/update_serializability2.js | 2 |
11 files changed, 37 insertions, 37 deletions
diff --git a/jstests/parallel/allops.js b/jstests/parallel/allops.js index 7f94fb5fa23..aff77ced7fe 100644 --- a/jstests/parallel/allops.js +++ b/jstests/parallel/allops.js @@ -1,5 +1,5 @@ // test all operations in parallel -load('jstests/libs/parallelTester.js') +load('jstests/libs/parallelTester.js'); f = db.jstests_parallel_allops; f.drop(); diff --git a/jstests/parallel/basic.js b/jstests/parallel/basic.js index c7d44142042..5d9183556a1 100644 --- a/jstests/parallel/basic.js +++ b/jstests/parallel/basic.js @@ -1,5 +1,5 @@ // perform basic js tests in parallel -load('jstests/libs/parallelTester.js') +load('jstests/libs/parallelTester.js'); Random.setRandomSeed(); diff --git a/jstests/parallel/basicPlus.js b/jstests/parallel/basicPlus.js index c3d432ef600..2153923c67a 100644 --- a/jstests/parallel/basicPlus.js +++ b/jstests/parallel/basicPlus.js @@ -1,5 +1,5 @@ // perform basic js tests in parallel & some other tasks as well -load('jstests/libs/parallelTester.js') +load('jstests/libs/parallelTester.js'); var c = db.jstests_parallel_basicPlus; c.drop(); diff --git a/jstests/parallel/checkMultiThread.js b/jstests/parallel/checkMultiThread.js index 9210378ed9c..0332fe32e84 100644 --- a/jstests/parallel/checkMultiThread.js +++ b/jstests/parallel/checkMultiThread.js @@ -1,8 +1,8 @@ -load('jstests/libs/parallelTester.js') +load('jstests/libs/parallelTester.js'); var start = new Date(); print("start: " + start); -var func = function() { db.runCommand({$eval: "sleep(10000);", nolock: true}); return new Date();} +var func = function() { db.runCommand({$eval: "sleep(10000);", nolock: true}); return new Date();}; a = new ScopedThread( func ); b = new ScopedThread( func ); a.start(); diff --git a/jstests/parallel/del.js b/jstests/parallel/del.js index f197ec51bab..17c97bc499b 100644 --- a/jstests/parallel/del.js +++ b/jstests/parallel/del.js @@ -1,42 +1,42 @@ -load('jstests/libs/parallelTester.js') +load('jstests/libs/parallelTester.js'); N = 1000; -HOST = db.getMongo().host +HOST = db.getMongo().host; -a = db.getSisterDB( "fooa" ) -b = db.getSisterDB( "foob" ) +a = db.getSisterDB( "fooa" ); +b = db.getSisterDB( "foob" ); a.dropDatabase(); b.dropDatabase(); function del1( dbname, host, max ){ - var m = new Mongo( host ) + var m = new Mongo( host ); var db = m.getDB( "foo" + dbname ); - var t = db.del + var t = db.del; while ( !db.del_parallel.count() ){ var r = Math.random(); var n = Math.floor( Math.random() * max ); if ( r < .9 ){ - t.insert( { x : n } ) + t.insert( { x : n } ); } else if ( r < .98 ){ t.remove( { x : n } ); } else if ( r < .99 ){ - t.remove( { x : { $lt : n } } ) + t.remove( { x : { $lt : n } } ); } else { t.remove( { x : { $gt : n } } ); } if ( r > .9999 ) - print( t.count() ) + print( t.count() ); } } function del2( dbname, host, max ){ - var m = new Mongo( host ) + var m = new Mongo( host ); var db = m.getDB( "foo" + dbname ); - var t = db.del + var t = db.del; while ( !db.del_parallel.count() ){ var r = Math.random(); @@ -44,7 +44,7 @@ function del2( dbname, host, max ){ var s = Math.random() > .5 ? 1 : -1; if ( r < .5 ){ - t.findOne( { x : n } ) + t.findOne( { x : n } ); } else if ( r < .75 ){ t.find( { x : { $lt : n } } ).sort( { x : s } ).itcount(); @@ -55,25 +55,25 @@ function del2( dbname, host, max ){ } } -all = [] +all = []; -all.push( fork( del1 , "a", HOST, N ) ) -all.push( fork( del2 , "a", HOST, N ) ) -all.push( fork( del1 , "b", HOST, N ) ) -all.push( fork( del2 , "b", HOST, N ) ) +all.push( fork( del1 , "a", HOST, N ) ); +all.push( fork( del2 , "a", HOST, N ) ); +all.push( fork( del1 , "b", HOST, N ) ); +all.push( fork( del2 , "b", HOST, N ) ); for ( i=0; i<all.length; i++ ) - all[i].start() + all[i].start(); for ( i=0; i<10; i++ ){ - sleep( 2000 ) - print( "dropping" ) + sleep( 2000 ); + print( "dropping" ); a.dropDatabase(); b.dropDatabase(); } -a.del_parallel.save({done: 1}) -b.del_parallel.save({done: 1}) +a.del_parallel.save({done: 1}); +b.del_parallel.save({done: 1}); for ( i=0; i<all.length; i++ ) - all[i].join() + all[i].join(); diff --git a/jstests/parallel/insert.js b/jstests/parallel/insert.js index 86fa0258d39..64a357905c5 100644 --- a/jstests/parallel/insert.js +++ b/jstests/parallel/insert.js @@ -1,5 +1,5 @@ // perform inserts in parallel from several clients -load('jstests/libs/parallelTester.js') +load('jstests/libs/parallelTester.js'); f = db.jstests_parallel_insert; f.drop(); diff --git a/jstests/parallel/manyclients.js b/jstests/parallel/manyclients.js index 4b105c162ba..1e845601aef 100644 --- a/jstests/parallel/manyclients.js +++ b/jstests/parallel/manyclients.js @@ -1,5 +1,5 @@ // perform inserts in parallel from a large number of clients -load('jstests/libs/parallelTester.js') +load('jstests/libs/parallelTester.js'); f = db.jstests_parallel_manyclients; f.drop(); @@ -11,7 +11,7 @@ t = new ParallelTester(); // Reducing the number of threads to 100 because of WT-1989 numThreads = 100; -buildInfo = db.adminCommand( "buildInfo" ) +buildInfo = db.adminCommand( "buildInfo" ); if ( buildInfo.bits < 64 || buildInfo.buildEnvironment.target_os != "linux" || diff --git a/jstests/parallel/repl.js b/jstests/parallel/repl.js index 240002656e8..714d0f7742e 100644 --- a/jstests/parallel/repl.js +++ b/jstests/parallel/repl.js @@ -1,7 +1,7 @@ // test basic operations in parallel, with replication -load('jstests/libs/parallelTester.js') +load('jstests/libs/parallelTester.js'); -baseName = "parallel_repl" +baseName = "parallel_repl"; rt = new ReplTest( baseName ); diff --git a/jstests/parallel/shellfork.js b/jstests/parallel/shellfork.js index d89e6c5d547..ad05c0d4fbe 100644 --- a/jstests/parallel/shellfork.js +++ b/jstests/parallel/shellfork.js @@ -1,11 +1,11 @@ -load('jstests/libs/parallelTester.js') +load('jstests/libs/parallelTester.js'); a = fork( function( a, b ) { return a / b; }, 10, 2 ); a.start(); b = fork( function( a, b, c ) { return a + b + c; }, 18, " is a ", "multiple of 3" ); makeFunny = function( text ) { return text + " ha ha!"; -} +}; c = fork( makeFunny, "paisley" ); c.start(); b.start(); diff --git a/jstests/parallel/update_serializability1.js b/jstests/parallel/update_serializability1.js index 763b54e9d52..55fc119101d 100644 --- a/jstests/parallel/update_serializability1.js +++ b/jstests/parallel/update_serializability1.js @@ -4,7 +4,7 @@ t.drop(); N = 100000; -bulk = t.initializeUnorderedBulkOp() +bulk = t.initializeUnorderedBulkOp(); for ( var i = 0; i < N; i++ ) { bulk.insert( { _id : i, a : i, b: N-i, x : 1, y : 1 } ); } diff --git a/jstests/parallel/update_serializability2.js b/jstests/parallel/update_serializability2.js index 878fdec4d37..c99eafea9ef 100644 --- a/jstests/parallel/update_serializability2.js +++ b/jstests/parallel/update_serializability2.js @@ -5,7 +5,7 @@ function test() { var N = 100000; - var bulk = t.initializeUnorderedBulkOp() + var bulk = t.initializeUnorderedBulkOp(); for ( var i = 0; i < N; i++ ) { bulk.insert( { _id : i, a : i, b: N-i, x : 1, y : 1 } ); } |