mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-29 16:47:28 +01:00
finish removing msg
This commit is contained in:
parent
006f2cdab8
commit
a3c5fd0642
@ -279,10 +279,12 @@ def runTest(test):
|
||||
print " " + str((t2 - t1) * 1000) + "ms"
|
||||
if r != 0:
|
||||
raise TestExitFailure(path, r)
|
||||
if Popen([mongod_executable, "msg", "ping", mongod_port], stdout=PIPE).communicate()[0].count( "****ok") == 0:
|
||||
raise TestServerFailure(path)
|
||||
if call([mongod_executable, "msg", "ping", mongod_port]) != 0:
|
||||
|
||||
try:
|
||||
c = Connection( "127.0.0.1" , int(mongod_port) )
|
||||
except Exception,e:
|
||||
raise TestServerFailure(path)
|
||||
|
||||
print ""
|
||||
|
||||
def run_tests(tests):
|
||||
|
34
db/db.cpp
34
db/db.cpp
@ -299,40 +299,6 @@ sendmore:
|
||||
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 ) {
|
||||
static DBDirectClient db;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user