diff options
author | Gregory Noma <gregory.noma@gmail.com> | 2022-04-07 15:05:30 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-07 19:58:16 +0000 |
commit | c9f9b3e5a9124c35b5e8c69ed89c47b4d5ab41a9 (patch) | |
tree | f4f936685423e9871aacb7e41df98328d2f68712 /src/mongo/db/s/resharding | |
parent | f4398987e7222d2e55fec776bc7a2e3c44af42cf (diff) | |
download | mongo-c9f9b3e5a9124c35b5e8c69ed89c47b4d5ab41a9.tar.gz |
SERVER-65146 Run unit tests with `wiredTiger` by default
Diffstat (limited to 'src/mongo/db/s/resharding')
5 files changed, 23 insertions, 2 deletions
diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp index 716a7278a36..e3b59a8068f 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp @@ -127,6 +127,10 @@ class ReshardingCoordinatorServiceTest : public ConfigServerTestFixture { public: using ReshardingCoordinator = ReshardingCoordinatorService::ReshardingCoordinator; + // TODO (SERVER-65302): Use wiredTiger. + ReshardingCoordinatorServiceTest() + : ConfigServerTestFixture(Options{}.engine("ephemeralForTest")) {} + std::unique_ptr<repl::PrimaryOnlyService> makeService(ServiceContext* serviceContext) { return std::make_unique<ReshardingCoordinatorServiceForTest>(serviceContext); } diff --git a/src/mongo/db/s/resharding/resharding_donor_recipient_common_test.cpp b/src/mongo/db/s/resharding/resharding_donor_recipient_common_test.cpp index f4437351785..3fccff9812c 100644 --- a/src/mongo/db/s/resharding/resharding_donor_recipient_common_test.cpp +++ b/src/mongo/db/s/resharding/resharding_donor_recipient_common_test.cpp @@ -32,6 +32,7 @@ #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/persistent_task_store.h" +#include "mongo/db/repl/oplog.h" #include "mongo/db/repl/wait_for_majority_service.h" #include "mongo/db/s/collection_sharding_runtime.h" #include "mongo/db/s/operation_sharding_state.h" @@ -315,8 +316,11 @@ public: ASSERT_OK(replCoord->setFollowerMode(repl::MemberState::RS_PRIMARY)); ASSERT_OK(replCoord->updateTerm(operationContext(), _term)); - replCoord->setMyLastAppliedOpTimeAndWallTime( - repl::OpTimeAndWallTime(repl::OpTime(Timestamp(1, 1), _term), Date_t())); + + WriteUnitOfWork wuow{operationContext()}; + replCoord->setMyLastAppliedOpTimeAndWallTime(repl::OpTimeAndWallTime( + repl::OpTime(repl::getNextOpTime(operationContext()).getTimestamp(), _term), Date_t())); + wuow.commit(); _primaryOnlyServiceRegistry->onStepUpComplete(operationContext(), _term); } diff --git a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp index f1361bfb165..c9d188252a8 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp @@ -298,6 +298,11 @@ public: << sessionTxnRecord.toBSON() << ", " << foundOp; } +protected: + // TODO (SERVER-65307): Use wiredTiger. + ReshardingOplogBatchApplierTest() + : ServiceContextMongoDTest(Options{}.engine("ephemeralForTest")) {} + private: ChunkManager makeChunkManagerForSourceCollection() { const OID epoch = OID::gen(); diff --git a/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp index dfaa498e4f6..00d3f6af370 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp @@ -310,6 +310,11 @@ public: return _oplogBufferNss; } +protected: + // TODO (SERVER-65306): Use wiredTiger. + ReshardingOplogSessionApplicationTest() + : ServiceContextMongoDTest(Options{}.engine("ephemeralForTest")) {} + private: // Used for pre/post image oplog entry lookup. const ShardId _donorShardId{"donor-0"}; diff --git a/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp b/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp index c41f4ce7db3..290a8837e9f 100644 --- a/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp +++ b/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp @@ -150,6 +150,9 @@ class ReshardingTxnClonerTest : public ShardServerTestFixture { } protected: + // TODO (SERVER-65303): Use wiredTiger. + ReshardingTxnClonerTest() : ShardServerTestFixture(Options{}.engine("ephemeralForTest")) {} + const UUID kDefaultReshardingId = UUID::gen(); const std::vector<ShardId> kTwoShardIdList{_myShardName, {"otherShardName"}}; const std::vector<ReshardingSourceId> kTwoSourceIdList = { |