SERVER-470 complete setup for parallel clients in separate js scopes
This commit is contained in:
@@ -27,6 +27,9 @@ namespace mongo {
|
||||
|
||||
namespace shellUtils {
|
||||
|
||||
std::string _dbConnect;
|
||||
std::string _dbAuth;
|
||||
|
||||
const char *argv0 = 0;
|
||||
void RecordMyLocation( const char *_argv0 ) { argv0 = _argv0; }
|
||||
|
||||
@@ -503,6 +506,13 @@ namespace mongo {
|
||||
scope.externalSetup();
|
||||
mongo::shellUtils::installShellUtils( scope );
|
||||
scope.execSetup( jsconcatcode_server , "setupServerCode" );
|
||||
|
||||
if ( !_dbConnect.empty() ) {
|
||||
massert( 12513, "connect failed", scope.exec( _dbConnect , "(connect)" , false , true , false ) );
|
||||
if ( !_dbAuth.empty() ) {
|
||||
massert( 12514, "login failed", scope.exec( _dbAuth , "(auth)" , true , true , false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user