summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Nelson <lamont.nelson@mongodb.com>2020-02-21 18:34:33 -0500
committerLamont Nelson <lamont.nelson@mongodb.com>2020-02-24 13:38:39 -0500
commit5eac4cb0fc6cd22258dc4d824aee635913eacefc (patch)
tree2ad0097ab676ab4a89ced64772ab81693a6554c1
parent410fee677ce07be063d9cb84335085ad36742f09 (diff)
downloadmongo-5eac4cb0fc6cd22258dc4d824aee635913eacefc.tar.gz
fix topology version test
-rw-r--r--src/mongo/client/sdam/topology_description_test.cpp5
-rw-r--r--src/mongo/client/server_is_master_monitor.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/client/sdam/topology_description_test.cpp b/src/mongo/client/sdam/topology_description_test.cpp
index d43be9642b8..4ae91fe7edd 100644
--- a/src/mongo/client/sdam/topology_description_test.cpp
+++ b/src/mongo/client/sdam/topology_description_test.cpp
@@ -40,9 +40,14 @@ namespace mongo {
template std::ostream& operator<<(std::ostream& os,
const std::vector<mongo::sdam::ServerAddress>& s);
+bool operator==(const TopologyVersion& a, const TopologyVersion& b) {
+ return a.getProcessId() == b.getProcessId() && a.getCounter() == b.getCounter();
+}
+
namespace sdam {
using mongo::operator<<;
+
class TopologyDescriptionTestFixture : public SdamTestFixture {
protected:
void assertDefaultConfig(const TopologyDescription& topologyDescription);
diff --git a/src/mongo/client/server_is_master_monitor.h b/src/mongo/client/server_is_master_monitor.h
index 14e2e202ba4..2756c322a56 100644
--- a/src/mongo/client/server_is_master_monitor.h
+++ b/src/mongo/client/server_is_master_monitor.h
@@ -1,4 +1,3 @@
-
/**
* Copyright (C) 2020-present MongoDB, Inc.
*
@@ -127,7 +126,7 @@ private:
SdamConfiguration _sdamConfiguration;
TopologyEventsPublisherPtr _eventPublisher;
std::shared_ptr<executor::TaskExecutor> _executor;
- std::unordered_map<ServerAddress, SingleServerIsMasterMonitorPtr> _singleMonitors;
+ stdx::unordered_map<ServerAddress, SingleServerIsMasterMonitorPtr> _singleMonitors;
bool _isShutdown;
MongoURI _setUri;
};