0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

finish removing msg

This commit is contained in:
Eliot Horowitz 2011-01-16 02:21:07 -05:00
parent 006f2cdab8
commit a3c5fd0642
2 changed files with 5 additions and 37 deletions

View File

@ -279,10 +279,12 @@ def runTest(test):
print " " + str((t2 - t1) * 1000) + "ms" print " " + str((t2 - t1) * 1000) + "ms"
if r != 0: if r != 0:
raise TestExitFailure(path, r) raise TestExitFailure(path, r)
if Popen([mongod_executable, "msg", "ping", mongod_port], stdout=PIPE).communicate()[0].count( "****ok") == 0:
raise TestServerFailure(path) try:
if call([mongod_executable, "msg", "ping", mongod_port]) != 0: c = Connection( "127.0.0.1" , int(mongod_port) )
except Exception,e:
raise TestServerFailure(path) raise TestServerFailure(path)
print "" print ""
def run_tests(tests): def run_tests(tests):

View File

@ -299,40 +299,6 @@ sendmore:
globalScriptEngine->threadDone(); globalScriptEngine->threadDone();
} }
/* todo: eliminate msg */
void msg(const char *m, const char *address, int port, int extras = 0) {
SockAddr db(address, port);
MessagingPort p;
if ( !p.connect(db) ) {
log() << "msg couldn't connect" << endl;
return;
}
Message send;
Message response;
send.setData( dbMsg , m);
int len = send.header()->dataLen();
for ( int i = 0; i < extras; i++ )
p.say(/*db, */send);
Timer t;
bool ok = p.call(send, response);
double tm = ((double) t.micros()) + 1;
log() << " ****ok. response.data:" << ok << " time:" << tm / 1000.0 << "ms "
<< "len: " << len << " data: " << response.singleData()->_data << endl;
sleepsecs(1);
p.shutdown();
}
void msg(const char *m, int extras = 0) {
msg(m, "127.0.0.1", CmdLine::DefaultDBPort, extras);
}
bool doDBUpgrade( const string& dbName , string errmsg , DataFileHeader * h ) { bool doDBUpgrade( const string& dbName , string errmsg , DataFileHeader * h ) {
static DBDirectClient db; static DBDirectClient db;