summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/mock/mock_remote_db_server.cpp
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2012-12-05 12:13:58 -0500
committerRandolph Tan <randolph@10gen.com>2012-12-05 13:28:37 -0500
commitdf08bd861053509f84c4c5fcb42ccd7c5fca25bb (patch)
treec6711a8c131901f3ea52122a0644551cb7efe2e9 /src/mongo/dbtests/mock/mock_remote_db_server.cpp
parent0963cf638eccf52d1aa14d045fc4c80a4433429c (diff)
downloadmongo-df08bd861053509f84c4c5fcb42ccd7c5fca25bb.tar.gz
SERVER-6754 Buildbot failure fix for shard_conn_test
Explicitly specify port number when instantiating the mock server.
Diffstat (limited to 'src/mongo/dbtests/mock/mock_remote_db_server.cpp')
-rw-r--r--src/mongo/dbtests/mock/mock_remote_db_server.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/dbtests/mock/mock_remote_db_server.cpp b/src/mongo/dbtests/mock/mock_remote_db_server.cpp
index 0887b323e7a..58ce8a07f6b 100644
--- a/src/mongo/dbtests/mock/mock_remote_db_server.cpp
+++ b/src/mongo/dbtests/mock/mock_remote_db_server.cpp
@@ -51,9 +51,9 @@ namespace mongo {
return reply;
}
- MockRemoteDBServer::MockRemoteDBServer(const string& hostName):
+ MockRemoteDBServer::MockRemoteDBServer(const string& hostAndPort):
_isRunning(true),
- _hostName(hostName),
+ _hostAndPort(hostAndPort),
_delayMilliSec(0),
_cmdCount(0),
_queryCount(0),
@@ -191,18 +191,18 @@ namespace mongo {
}
string MockRemoteDBServer::getServerAddress() const {
- return _hostName;
+ return _hostAndPort;
}
string MockRemoteDBServer::toString() {
- return _hostName;
+ return _hostAndPort;
}
void MockRemoteDBServer::checkIfUp(InstanceID id) const {
scoped_spinlock sLock(_lock);
if (!_isRunning || id < _instanceID) {
- throw mongo::SocketException(mongo::SocketException::CLOSED, _hostName);
+ throw mongo::SocketException(mongo::SocketException::CLOSED, _hostAndPort);
}
}
}