summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/isself_test.cpp
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@mongodb.com>2022-08-16 15:38:50 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-13 18:59:33 +0000
commitcd276c3cb1bf8a9bca55537e1393a52349cccfc8 (patch)
tree5a9f914ff5ddeb79f6ceb0cf89452b277b62b975 /src/mongo/db/repl/isself_test.cpp
parent71715290cbe0caeac6911176b9721d664444d19a (diff)
SERVER-66050 findSelfInConfig should attempt fast path for every HostAndPort before trying slow pathr4.4.19-rc1
(cherry picked from commit 0c0f80372c2adee56c16c106ec2711d39ea6b45f)
Diffstat (limited to 'src/mongo/db/repl/isself_test.cpp')
-rw-r--r--src/mongo/db/repl/isself_test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/repl/isself_test.cpp b/src/mongo/db/repl/isself_test.cpp
index 511ef122ecf..91ad0ad3803 100644
--- a/src/mongo/db/repl/isself_test.cpp
+++ b/src/mongo/db/repl/isself_test.cpp
@@ -55,6 +55,7 @@ TEST_F(ServiceContextTest, DetectsSameHostIPv4) {
// Fastpath should agree with the result of getBoundAddrs
// since it uses it...
for (std::vector<string>::const_iterator it = addrs.begin(); it != addrs.end(); ++it) {
+ ASSERT(isSelfFastPath(HostAndPort(*it, serverGlobalParams.port)));
ASSERT(isSelf(HostAndPort(*it, serverGlobalParams.port), getGlobalServiceContext()));
}
#else
@@ -72,6 +73,7 @@ TEST_F(ServiceContextTest, DetectsSameHostIPv6) {
// Fastpath should agree with the result of getBoundAddrs
// since it uses it...
for (std::vector<string>::const_iterator it = addrs.begin(); it != addrs.end(); ++it) {
+ ASSERT(isSelfFastPath(HostAndPort(*it, serverGlobalParams.port)));
ASSERT(isSelf(HostAndPort(*it, serverGlobalParams.port), getGlobalServiceContext()));
}
#else