From d23e79eb9e69bd746416d9f674dfaee59457c887 Mon Sep 17 00:00:00 2001 From: Siyuan Zhou Date: Sun, 6 Nov 2016 01:33:50 -0400 Subject: Revert "SERVER-26202 Relax index constraints in oplog application" This reverts commit f00448255bbb24c07e2f55e7e229f19e316350a6. --- src/mongo/s/sharding_mongod_test_fixture.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mongo/s/sharding_mongod_test_fixture.cpp') diff --git a/src/mongo/s/sharding_mongod_test_fixture.cpp b/src/mongo/s/sharding_mongod_test_fixture.cpp index 3e8c9f013d7..ae91dc4ed5e 100644 --- a/src/mongo/s/sharding_mongod_test_fixture.cpp +++ b/src/mongo/s/sharding_mongod_test_fixture.cpp @@ -120,7 +120,9 @@ void ShardingMongodTestFixture::setUp() { replSetConfig.initialize(BSON("_id" << _setName << "protocolVersion" << 1 << "version" << 3 << "members" << serversBob.arr())); - replCoordPtr->setGetConfigReturnValue(replSetConfig); + auto replCoordMockPtr = dynamic_cast(replicationCoordinator()); + invariant(replCoordMockPtr); + replCoordMockPtr->setGetConfigReturnValue(replSetConfig); repl::ReplicationCoordinator::set(serviceContext, std::move(replCoordPtr)); @@ -129,7 +131,7 @@ void ShardingMongodTestFixture::setUp() { repl::createOplog(_opCtx.get()); } -std::unique_ptr ShardingMongodTestFixture::makeReplicationCoordinator( +std::unique_ptr ShardingMongodTestFixture::makeReplicationCoordinator( ReplSettings replSettings) { return stdx::make_unique(replSettings); } @@ -370,7 +372,7 @@ executor::TaskExecutor* ShardingMongodTestFixture::executor() const { return Grid::get(operationContext())->getExecutorPool()->getFixedExecutor(); } -repl::ReplicationCoordinatorMock* ShardingMongodTestFixture::replicationCoordinator() const { +repl::ReplicationCoordinator* ShardingMongodTestFixture::replicationCoordinator() const { invariant(_replCoord); return _replCoord; } -- cgit v1.2.1