From fc8538ac9231a104d5858b25d24d6ca688c385ea Mon Sep 17 00:00:00 2001 From: Randolph Tan Date: Tue, 25 Jun 2013 17:13:33 -0400 Subject: SERVER-10006 Secondary read pref with tag can end up selecting no nodes on retry Added more descriptive comments for the tests. --- src/mongo/dbtests/replica_set_monitor_test.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mongo/dbtests') diff --git a/src/mongo/dbtests/replica_set_monitor_test.cpp b/src/mongo/dbtests/replica_set_monitor_test.cpp index 77eed10e7ff..59d801487ba 100644 --- a/src/mongo/dbtests/replica_set_monitor_test.cpp +++ b/src/mongo/dbtests/replica_set_monitor_test.cpp @@ -1680,7 +1680,9 @@ namespace mongo_test { boost::scoped_ptr _replSet; }; - // Tests the node selection retry logic when the connection went bad. + // Tests the case where the connection to secondary went bad and the replica set + // monitor needs to perform a refresh of it's local view then retry the node selection + // again after the refresh. TEST_F(TwoNodeWithTags, SecDownRetryNoTag) { MockReplicaSet* replSet = getReplSet(); @@ -1705,7 +1707,9 @@ namespace mongo_test { ASSERT_EQUALS(secHost, node.toString(true)); } - // Tests the node selection retry logic with tags when the connection went bad. + // Tests the case where the connection to secondary went bad and the replica set + // monitor needs to perform a refresh of it's local view then retry the node selection + // with tags again after the refresh. TEST_F(TwoNodeWithTags, SecDownRetryWithTag) { MockReplicaSet* replSet = getReplSet(); -- cgit v1.2.1