diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-11-19 10:59:02 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-11-19 11:56:42 -0500 |
commit | 078ca783b7aa817a8f1a9629f495ccb414d189f3 (patch) | |
tree | 8702eab6b2605768033d61458f6893786cd93d6c | |
parent | 46d22dc70b34863e17baff7268dd632a45e1a4b6 (diff) | |
download | mongo-078ca783b7aa817a8f1a9629f495ccb414d189f3.tar.gz |
SERVER-21489 Fix broken passthrough suite
4 files changed, 52 insertions, 52 deletions
diff --git a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough.yml index fc55a134dd4..456fd210201 100644 --- a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough.yml @@ -30,6 +30,7 @@ selector: - jstests/core/profile*.js # profiling. - jstests/core/rename*.js # renameCollection. - jstests/core/stages*.js # stageDebug. + - jstests/core/startup_log.js # "local" database. - jstests/core/storageDetailsCommand.js # diskStorageStats. - jstests/core/tailable_skip_limit.js # capped collections. - jstests/core/top.js # top. diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml index 5e0dc37feaa..a079b2f8868 100644 --- a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml @@ -27,6 +27,7 @@ selector: - jstests/core/notablescan.js # notablescan. - jstests/core/profile*.js # profiling. - jstests/core/stages*.js # stageDebug. + - jstests/core/startup_log.js # "local" database. - jstests/core/storageDetailsCommand.js # diskStorageStats. - jstests/core/top.js # top. # The following tests fail because mongos behaves differently from mongod when testing certain diff --git a/jstests/libs/parallelTester.js b/jstests/libs/parallelTester.js index 8b42fc0c7c7..0ea562812fc 100644 --- a/jstests/libs/parallelTester.js +++ b/jstests/libs/parallelTester.js @@ -113,8 +113,7 @@ if ( typeof _threadInject != "undefined" ){ } // some tests can't run in parallel with most others - var skipTests = makeKeys([ "dbadmin.js", - "repair.js", + var skipTests = makeKeys([ "repair.js", "cursor8.js", "recstore.js", "extent.js", diff --git a/jstests/sharding/auto2.js b/jstests/sharding/auto2.js index 0c0a6730250..6115e7cda4a 100644 --- a/jstests/sharding/auto2.js +++ b/jstests/sharding/auto2.js @@ -8,60 +8,55 @@ s.adminCommand( { enablesharding : "test" } ); s.ensurePrimaryShard('test', 'shard0001'); s.adminCommand( { shardcollection : "test.foo" , key : { num : 1 } } ); -bigString = ""; -while ( bigString.length < 1024 * 50 ) +var bigString = ""; +while (bigString.length < 1024 * 50) { bigString += "asocsancdnsjfnsdnfsjdhfasdfasdfasdfnsadofnsadlkfnsaldknfsad"; +} -db = s.getDB( "test" ) -coll = db.foo; - -// Temporarily disable balancer so it will not interfere with auto-splitting -s.stopBalancer(); - -var i=0; -for ( j=0; j<30; j++ ){ - print( "j:" + j + " : " + - Date.timeFunc( - function(){ - var bulk = coll.initializeUnorderedBulkOp(); - for ( var k=0; k<100; k++ ){ - bulk.insert( { num : i , s : bigString } ); - i++; - } - assert.writeOK(bulk.execute()); - } - ) ); - +var db = s.getDB("test" ); +var coll = db.foo; + +var i = 0; +for (var j = 0; j < 30; j++) { + print("j:" + j + " : " + + Date.timeFunc(function() { + var bulk = coll.initializeUnorderedBulkOp(); + for (var k = 0; k < 100; k++) { + bulk.insert({ num : i, s : bigString }); + i++; + } + assert.writeOK(bulk.execute()); + })); } s.startBalancer(); assert.eq( i , j * 100 , "setup" ); + // Until SERVER-9715 is fixed, the sync command must be run on a diff connection -new Mongo( s.s.host ).adminCommand( "connpoolsync" ); +new Mongo(s.s.host).adminCommand("connpoolsync"); -print( "done inserting data" ); +print("done inserting data" ); -print( "datasize: " + tojson( s.getServer( "test" ).getDB( "admin" ).runCommand( { datasize : "test.foo" } ) ) ); +print("datasize: " + tojson( s.getServer("test" ).getDB("admin" ).runCommand( { datasize : "test.foo" } ) ) ); s.printChunks(); function doCountsGlobal(){ - counta = s._connections[0].getDB( "test" ).foo.count(); - countb = s._connections[1].getDB( "test" ).foo.count(); + counta = s._connections[0].getDB("test" ).foo.count(); + countb = s._connections[1].getDB("test" ).foo.count(); return counta + countb; } // Wait for the chunks to distribute assert.soon( function(){ - doCountsGlobal() - - print( "Counts: " + counta + countb) + doCountsGlobal(); + print("Counts: " + counta + countb); return counta > 0 && countb > 0 -}) +}); -print( "checkpoint B" ) +print("checkpoint B" ) var missing = []; @@ -69,15 +64,15 @@ for ( i=0; i<j*100; i++ ){ var x = coll.findOne( { num : i } ); if ( ! x ){ missing.push( i ); - print( "can't find: " + i ); + print("can't find: " + i ); sleep( 5000 ); x = coll.findOne( { num : i } ); if ( ! x ){ - print( "still can't find: " + i ); + print("still can't find: " + i ); for ( var zzz=0; zzz<s._connections.length; zzz++ ){ - if ( s._connections[zzz].getDB( "test" ).foo.findOne( { num : i } ) ){ - print( "found on wrong server: " + s._connections[zzz] ); + if ( s._connections[zzz].getDB("test" ).foo.findOne( { num : i } ) ){ + print("found on wrong server: " + s._connections[zzz] ); } } @@ -87,15 +82,15 @@ for ( i=0; i<j*100; i++ ){ s.printChangeLog(); -print( "missing: " + tojson( missing ) ) +print("missing: " + tojson( missing ) ) assert.soon( function(z){ return doCountsGlobal() == j * 100; } , "from each a:" + counta + " b:" + countb + " i:" + i ); -print( "checkpoint B.a" ) +print("checkpoint B.a" ) s.printChunks(); assert.eq( j * 100 , coll.find().limit(100000000).itcount() , "itcount A" ); assert.eq( j * 100 , counta + countb , "from each 2 a:" + counta + " b:" + countb + " i:" + i ); assert( missing.length == 0 , "missing : " + tojson( missing ) ); -print( "checkpoint C" ) +print("checkpoint C" ) assert( Array.unique( s.config.chunks.find().toArray().map( function(z){ return z.shard; } ) ).length == 2 , "should be using both servers" ); @@ -106,10 +101,10 @@ for ( i=0; i<100; i++ ){ gc(); } -print( "checkpoint D") +print("checkpoint D") // test not-sharded cursors -db = s.getDB( "test2" ); +db = s.getDB("test2" ); t = db.foobar; for ( i =0; i<100; i++ ) t.save( { _id : i } ); @@ -127,24 +122,28 @@ assert.eq(0, db.serverStatus().metrics.cursor.open.total, "cursor2"); // Stop the balancer, otherwise it may grab some connections from the pool for itself s.stopBalancer() -print( "checkpoint E") +print("checkpoint E") assert( t.findOne() , "check close 0" ); -for ( i=0; i<20; i++ ){ - temp = new Mongo( db.getMongo().host ) - temp2 = temp.getDB( "test2" ).foobar; - assert.eq( temp._fullNameSpace , t._fullNameSpace , "check close 1" ); +for (i = 0; i < 20; i++) { + var conn = new Mongo( db.getMongo().host ); + temp2 = conn.getDB("test2" ).foobar; + assert.eq( conn._fullNameSpace , t._fullNameSpace , "check close 1" ); assert( temp2.findOne() , "check close 2" ); - temp = null; + conn = null; gc(); } -print( "checkpoint F") +print("checkpoint F"); -assert.throws( function(){ s.getDB( "test" ).foo.find().sort( { s : 1 } ).forEach( function( x ){ printjsononeline( x.substring( 0, x.length > 30 ? 30 : x.length ) ) } ) } ) +assert.throws(function() { + s.getDB("test" ).foo.find().sort({ s : 1 }).forEach(function(x) { + printjsononeline(x.substring(0, x.length > 30 ? 30 : x.length)); + }) +}); -print( "checkpoint G") +print("checkpoint G"); s.stop(); |