From bfebf440342a2266f8febec161334a700dc713af Mon Sep 17 00:00:00 2001 From: Kaloian Manassiev Date: Fri, 21 Mar 2014 14:01:44 -0400 Subject: SERVER-13306 mongobridge should not try forever to connect to dead destinations. The connect timeout is set to 15 seconds of retrying, after which the connection to the client will be terminated. Also added some extra logging and diagnostics so it is easier to analyse test failures in the future. --- src/mongo/shell/replsettest.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/mongo/shell') diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index 8bd16cb921a..4a71174f611 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -753,7 +753,7 @@ ReplSetTest.prototype.stop = function( n , signal, wait /* wait for stop */, opt wait = signal signal = undefined } - + wait = wait || false if( ! wait.toFixed ){ if( wait ) wait = 0 @@ -764,11 +764,15 @@ ReplSetTest.prototype.stop = function( n , signal, wait /* wait for stop */, opt print('ReplSetTest stop *** Shutting down mongod in port ' + port + ' ***'); var ret = MongoRunner.stopMongod( port , signal, opts ); - if( ! ret || wait < 0 ) return ret + if( ! ret || wait < 0 ) { + print('ReplSetTest stop *** Mongod in port ' + port + ' shutdown with code (' + + ret + '), wait (' + wait + ') ***'); + return ret; + } // Wait for shutdown this.waitForHealth( n, this.DOWN, wait ) - + return true } -- cgit v1.2.1