From 0b23e5ab80c96a8c5b001a1a33c5d6099c48ef2b Mon Sep 17 00:00:00 2001 From: Judah Schvimer Date: Wed, 18 Oct 2017 09:40:25 -0400 Subject: SERVER-31062 Added log messages before we do operations in rollback --- src/mongo/db/repl/rs_rollback_test.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/mongo/db/repl/rs_rollback_test.cpp') diff --git a/src/mongo/db/repl/rs_rollback_test.cpp b/src/mongo/db/repl/rs_rollback_test.cpp index b7d5b9abcf0..b916ad93fdb 100644 --- a/src/mongo/db/repl/rs_rollback_test.cpp +++ b/src/mongo/db/repl/rs_rollback_test.cpp @@ -563,8 +563,11 @@ TEST_F(RSRollbackTest, RollbackCreateIndexCommand) { _coordinator, _replicationProcess.get())); stopCapturingLogMessages(); - ASSERT_EQUALS( - 1, countLogLinesContaining("Dropped index in rollback: collection = test.t, index = a_1")); + ASSERT_EQUALS(1, + countLogLinesContaining( + str::stream() << "Dropped index in rollback for collection: test.t, UUID: " + << options.uuid->toString() + << ", index: a_1")); { Lock::DBLock dbLock(_opCtx.get(), "test", MODE_S); auto indexCatalog = collection->getIndexCatalog(); @@ -779,10 +782,16 @@ TEST_F(RSRollbackTest, RollingBackDropAndCreateOfSameIndexNameWithDifferentSpecs ASSERT_EQUALS(2, indexCatalog->numIndexesReady(_opCtx.get())); ASSERT_EQUALS( 1, - countLogLinesContaining("Dropped index in rollback: collection = test.t, index = a_1")); + countLogLinesContaining(str::stream() + << "Dropped index in rollback for collection: test.t, UUID: " + << options.uuid->toString() + << ", index: a_1")); ASSERT_EQUALS( 1, - countLogLinesContaining("Created index in rollback: collection = test.t, index = a_1")); + countLogLinesContaining(str::stream() + << "Created index in rollback for collection: test.t, UUID: " + << options.uuid->toString() + << ", index: a_1")); std::vector indexes; indexCatalog->findIndexesByKeyPattern(_opCtx.get(), BSON("a" << 1), false, &indexes); ASSERT(indexes.size() == 1); -- cgit v1.2.1