SERVER-107513: Avoid test assertion in oplog fetcher test for BSONObj… (#38501)

GitOrigin-RevId: 5b72a5fb2dc4285e7f514bf2382ade2309dc527a
This commit is contained in:
Xuerui Fa
2025-07-15 11:16:35 -04:00
committed by MongoDB Bot
parent 89e6bc5ff9
commit d27d9c3ca1

View File

@@ -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