summaryrefslogtreecommitdiff
path: root/src/mongo/client
diff options
context:
space:
mode:
authormathisbessamdb <mathis.bessa@mongodb.com>2023-04-11 22:02:26 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-17 23:09:15 +0000
commit3c5d9c099046af67ee02564cf5eeabd2031b5da2 (patch)
tree65931a95e185cf43382f8b8609645bd1cf160a81 /src/mongo/client
parent7e2837b75aef36024e9050ec183b0997a0afc143 (diff)
downloadmongo-3c5d9c099046af67ee02564cf5eeabd2031b5da2.tar.gz
SERVER-76085 Create createDatabaseName_forTest to be used in unit testing
Diffstat (limited to 'src/mongo/client')
-rw-r--r--src/mongo/client/dbclient_connection_integration_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/client/dbclient_connection_integration_test.cpp b/src/mongo/client/dbclient_connection_integration_test.cpp
index 65b3311583b..dd425212e9e 100644
--- a/src/mongo/client/dbclient_connection_integration_test.cpp
+++ b/src/mongo/client/dbclient_connection_integration_test.cpp
@@ -58,7 +58,7 @@ public:
auto conn = makeConn(kAppName + "-cleanup");
BSONObj currOp;
- if (!conn->runCommand({boost::none, "admin"}, BSON("currentOp" << 1), currOp))
+ if (!conn->runCommand(DatabaseName::kAdmin, BSON("currentOp" << 1), currOp))
uassertStatusOK(getStatusFromCommandResult(currOp));
for (auto&& op : currOp["inprog"].Obj()) {
@@ -75,7 +75,7 @@ public:
// Ignore failures to clean up.
BSONObj ignored;
(void)conn->runCommand(
- {boost::none, "admin"}, BSON("killOp" << 1 << "op" << op["opid"]), ignored);
+ DatabaseName::kAdmin, BSON("killOp" << 1 << "op" << op["opid"]), ignored);
}
}
};
@@ -86,7 +86,7 @@ TEST_F(DBClientConnectionFixture, shutdownWorksIfCalledFirst) {
conn->shutdownAndDisallowReconnect();
BSONObj reply;
- ASSERT_THROWS(conn->runCommand({boost::none, "admin"}, sleepCmd, reply),
+ ASSERT_THROWS(conn->runCommand(DatabaseName::kAdmin, sleepCmd, reply),
ExceptionForCat<ErrorCategory::NetworkError>); // Currently SocketException.
}
@@ -101,7 +101,7 @@ TEST_F(DBClientConnectionFixture, shutdownWorksIfRunCommandInProgress) {
ON_BLOCK_EXIT([&] { shutdownThread.join(); });
BSONObj reply;
- ASSERT_THROWS(conn->runCommand({boost::none, "admin"}, sleepCmd, reply),
+ ASSERT_THROWS(conn->runCommand(DatabaseName::kAdmin, sleepCmd, reply),
ExceptionForCat<ErrorCategory::NetworkError>); // Currently HostUnreachable.
}