summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/reporter_test.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2016-08-12 15:58:56 -0400
committerDavid Storch <david.storch@10gen.com>2016-08-18 11:14:17 -0400
commit26543060c852aac22f26143a04bf7789ec8fec53 (patch)
treedf3ae49e5c4745058be29b7ec8a8e4b528b50a9a /src/mongo/db/repl/reporter_test.cpp
parent13fa28982d008568f7620d73ddec0c61fad7cbc8 (diff)
downloadmongo-26543060c852aac22f26143a04bf7789ec8fec53.tar.gz
SERVER-24508 BSONObj::ComparatorInterface
BSONObj instances should now be compared via the comparator interface's evaluate() method. This preferred over using BSONObj::woCompare() directly. If the comparison doesn't require any database semantics (e.g. there is no collation), there is a global instance of the SimpleBSONObjComparator which should be used for BSONObj comparisons. If the comparison requires special semantics, then callers must instantiate their own comparator object.
Diffstat (limited to 'src/mongo/db/repl/reporter_test.cpp')
-rw-r--r--src/mongo/db/repl/reporter_test.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/repl/reporter_test.cpp b/src/mongo/db/repl/reporter_test.cpp
index 42ee28c6aa5..483901d0fb5 100644
--- a/src/mongo/db/repl/reporter_test.cpp
+++ b/src/mongo/db/repl/reporter_test.cpp
@@ -397,7 +397,7 @@ TEST_F(
processNetworkResponse(BSON("ok" << 0 << "code" << int(ErrorCodes::BadValue) << "errmsg"
<< "Unexpected field durableOpTime in UpdateInfoArgs"),
true);
- ASSERT_EQUALS(expectedNewStyleCommandRequest, commandRequest);
+ ASSERT_BSONOBJ_EQ(expectedNewStyleCommandRequest, commandRequest);
// Update command object should match old style (pre-3.2.4).
auto expectedOldStyleCommandRequest = unittest::assertGet(prepareReplSetUpdatePositionCommandFn(
@@ -408,7 +408,7 @@ TEST_F(
<< "newer config"
<< "configVersion"
<< posUpdater->getConfigVersion() + 1));
- ASSERT_EQUALS(expectedOldStyleCommandRequest, commandRequest);
+ ASSERT_BSONOBJ_EQ(expectedOldStyleCommandRequest, commandRequest);
ASSERT_TRUE(reporter->isActive());
}
@@ -543,7 +543,7 @@ TEST_F(ReporterTest,
processNetworkResponse(BSON("ok" << 0 << "code" << int(ErrorCodes::BadValue) << "errmsg"
<< "Unexpected field durableOpTime in UpdateInfoArgs"),
true);
- ASSERT_EQUALS(expectedNewStyleCommandRequest, commandRequest);
+ ASSERT_BSONOBJ_EQ(expectedNewStyleCommandRequest, commandRequest);
auto expectedOldStyleCommandRequest = unittest::assertGet(prepareReplSetUpdatePositionCommandFn(
ReplicationCoordinator::ReplSetUpdatePositionCommandStyle::kOldStyle));
@@ -551,8 +551,8 @@ TEST_F(ReporterTest,
commandRequest = processNetworkResponse(BSON("ok" << 1));
// Update command object should match old style (pre-3.2.2).
- ASSERT_NOT_EQUALS(expectedNewStyleCommandRequest, expectedOldStyleCommandRequest);
- ASSERT_EQUALS(expectedOldStyleCommandRequest, commandRequest);
+ ASSERT_BSONOBJ_NE(expectedNewStyleCommandRequest, expectedOldStyleCommandRequest);
+ ASSERT_BSONOBJ_EQ(expectedOldStyleCommandRequest, commandRequest);
reporter->shutdown();