SERVER-470 complete setup for parallel clients in separate js scopes

This commit is contained in:
Aaron
2009-12-29 19:01:10 -08:00
parent e88f0fdf45
commit 33cd7bc1e1
5 changed files with 44 additions and 27 deletions

View File

@@ -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 ) );
}
}
}
}
}