From d27d9c3ca15f905d00a67ea5dfccbddb475b4055 Mon Sep 17 00:00:00 2001 From: Xuerui Fa Date: Tue, 15 Jul 2025 11:16:35 -0400 Subject: [PATCH] =?UTF-8?q?SERVER-107513:=20Avoid=20test=20assertion=20in?= =?UTF-8?q?=20oplog=20fetcher=20test=20for=20BSONObj=E2=80=A6=20(#38501)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitOrigin-RevId: 5b72a5fb2dc4285e7f514bf2382ade2309dc527a --- src/mongo/db/repl/oplog_fetcher_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mongo/db/repl/oplog_fetcher_test.cpp b/src/mongo/db/repl/oplog_fetcher_test.cpp index 1609da6f2a7..6b3139511db 100644 --- a/src/mongo/db/repl/oplog_fetcher_test.cpp +++ b/src/mongo/db/repl/oplog_fetcher_test.cpp @@ -2742,12 +2742,12 @@ DEATH_TEST_REGEX_F(OplogFetcherTest, validateLastBatch(true /* skipFirstDoc */, firstBatch, oplogFetcher->getLastOpTimeFetched()); // Process second batch that throws BSONObjectTooLarge. - // Simulate a BSONObjectTooLarge error response to the OplogFetcher. + // Simulate a BSONObjectTooLarge error response to the OplogFetcher. This should cause the oplog + // fetcher to throw an exception. const Status tooLargeError = BSONObj().validateBSONObjSize(BSONObj::kMinBSONLength - 1); processSingleRequestResponse(oplogFetcher->getDBClientConnection_forTest(), tooLargeError); - // Can't be reached. - ASSERT_FALSE(true); + oplogFetcher->join(); } } // namespace