@@ -765,10 +765,10 @@ TEST_F(RenameCollectionTest,
765765 _opObserver->renameOpTime = {};
766766
767767 _createCollection (_opCtx.get (), _sourceNss);
768- auto dropTargetUUID = _createCollectionWithUUID (_opCtx.get (), _targetNss);
768+ _createCollection (_opCtx.get (), _targetNss);
769769 auto dbName = _sourceNss.db ().toString ();
770770 auto cmd = BSON (" renameCollection" << _sourceNss.ns () << " to" << _targetNss.ns () << " dropTarget"
771- << dropTargetUUID );
771+ << true );
772772
773773 repl::OpTime renameOpTime = {Timestamp (Seconds (200 ), 1U ), 1LL };
774774 ASSERT_OK (renameCollectionForApplyOps (_opCtx.get (), dbName, boost::none, cmd, renameOpTime));
@@ -787,10 +787,10 @@ DEATH_TEST_F(RenameCollectionTest,
787787 ASSERT_FALSE (_opCtx->writesAreReplicated ());
788788
789789 _createCollection (_opCtx.get (), _sourceNss);
790- auto dropTargetUUID = _createCollectionWithUUID (_opCtx.get (), _targetNss);
790+ _createCollection (_opCtx.get (), _targetNss);
791791 auto dbName = _sourceNss.db ().toString ();
792792 auto cmd = BSON (" renameCollection" << _sourceNss.ns () << " to" << _targetNss.ns () << " dropTarget"
793- << dropTargetUUID );
793+ << true );
794794
795795 repl::OpTime renameOpTime = {Timestamp (Seconds (200 ), 1U ), 1LL };
796796 ASSERT_OK (renameCollectionForApplyOps (_opCtx.get (), dbName, boost::none, cmd, renameOpTime));
@@ -824,20 +824,11 @@ TEST_F(RenameCollectionTest, RenameCollectionForApplyOpsDropTargetByUUIDEvenIfSo
824824 auto dropTargetNss = NamespaceString (" test.bar3" );
825825 _createCollectionWithUUID (_opCtx.get (), _targetNss);
826826 auto dropTargetUUID = _createCollectionWithUUID (_opCtx.get (), dropTargetNss);
827- // <<<<<<< HEAD
828827 auto uuid = UUID::gen ();
829828 auto cmd = BSON (" renameCollection" << missingSourceNss.ns () << " to" << _targetNss.ns ()
830829 << " dropTarget" << dropTargetUUID);
831830 ASSERT_OK (
832831 renameCollectionForApplyOps (_opCtx.get (), missingSourceNss.db ().toString (), uuid, cmd, {}));
833- // =======
834- // auto uuidDoc = BSON("ui" << UUID::gen());
835- // auto cmd = BSON("renameCollection" << missingSourceNss.ns() << "to" << _targetNss.ns()
836- // << "dropTarget" << dropTargetUUID);
837- // ASSERT_OK(renameCollectionForApplyOps(
838- // _opCtx.get(), missingSourceNss.db().toString(), uuidDoc["ui"], cmd, {}));
839- // >>>>>>> SERVER-42441 renameCollectionForApplyOps should always rename the target out of the
840- // way if it exists
841832 ASSERT_TRUE (_collectionExists (_opCtx.get (), _targetNss));
842833 ASSERT_FALSE (_collectionExists (_opCtx.get (), dropTargetNss));
843834}
@@ -872,12 +863,7 @@ TEST_F(RenameCollectionTest, RenameCollectionForApplyOpsDropTargetByUUIDEvenIfSo
872863 _createCollectionWithUUID (_opCtx.get (), _targetNss);
873864
874865 auto dropTargetUUID = _createCollectionWithUUID (_opCtx.get (), dropTargetNss);
875- // <<<<<<< HEAD
876866 auto uuid = _createCollectionWithUUID (_opCtx.get (), dropPendingNss);
877- // =======
878- // auto uuidDoc = BSON("ui" << _createCollectionWithUUID(_opCtx.get(), dropPendingNss));
879- // >>>>>>> SERVER-42441 renameCollectionForApplyOps should always rename the target out of the
880- // way if it exists
881867 auto cmd = BSON (" renameCollection" << dropPendingNss.ns () << " to" << _targetNss.ns ()
882868 << " dropTarget" << dropTargetUUID);
883869
@@ -1012,14 +998,8 @@ void _testRenameCollectionAcrossDatabaseOplogEntries(
1012998 if (forApplyOps) {
1013999 auto cmd = BSON (" renameCollection" << sourceNss.ns () << " to" << targetNss.ns ()
10141000 << " dropTarget" << true );
1015- // <<<<<<< HEAD
10161001 ASSERT_OK (
10171002 renameCollectionForApplyOps (opCtx, sourceNss.db ().toString (), boost::none, cmd, {}));
1018- // =======
1019- // ASSERT_OK(renameCollectionForApplyOps(opCtx, sourceNss.db().toString(), {}, cmd,
1020- // {}));
1021- // >>>>>>> SERVER-42441 renameCollectionForApplyOps should always rename the target out of
1022- // the way if it exists
10231003 } else {
10241004 RenameCollectionOptions options;
10251005 options.dropTarget = true ;
0 commit comments