summaryrefslogtreecommitdiff
path: root/src/mongo/client/dbclient_rs_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/client/dbclient_rs_test.cpp')
-rw-r--r--src/mongo/client/dbclient_rs_test.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/client/dbclient_rs_test.cpp b/src/mongo/client/dbclient_rs_test.cpp
index 1a97f870bcf..b80113649d5 100644
--- a/src/mongo/client/dbclient_rs_test.cpp
+++ b/src/mongo/client/dbclient_rs_test.cpp
@@ -38,6 +38,7 @@
#include <string>
#include <vector>
+#include "mongo/base/init.h"
#include "mongo/base/string_data.h"
#include "mongo/client/connpool.h"
#include "mongo/client/dbclient_rs.h"
@@ -60,6 +61,11 @@ using std::string;
using std::unique_ptr;
using std::vector;
+MONGO_INITIALIZER(DisableReplicaSetMonitorRefreshRetries)(InitializerContext*) {
+ ReplicaSetMonitor::disableRefreshRetries_forTest();
+ return Status::OK();
+}
+
/**
* Constructs a metadata object containing the passed server selection metadata.
*/