mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 09:06:21 +01:00
SERVER-46235 convert drop_collections_two_phase_rename_drop_target.js to use checkLog.containsJson()
This commit is contained in:
parent
82833b4186
commit
fa5f8749a1
@ -6,6 +6,7 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
load("jstests/libs/logv2_helpers.js");
|
||||
load('jstests/replsets/libs/two_phase_drops.js'); // For TwoPhaseDropCollectionTest.
|
||||
|
||||
// Return a list of all indexes for a given collection. Use 'args' as the
|
||||
@ -103,7 +104,11 @@ try {
|
||||
|
||||
// Confirm in the logs that the renameCollection dropped the target collection on the
|
||||
// secondary using two phase collection drop.
|
||||
if (isJsonLog(secondary)) {
|
||||
checkLog.containsJson(secondary, 20315, {nss: toColl.getFullName()});
|
||||
} else {
|
||||
checkLog.contains(secondary, new RegExp('dropCollection:.*' + toColl.getFullName()));
|
||||
}
|
||||
|
||||
// Rename target collection back to source collection. This helps to ensure the collection
|
||||
// metadata is updated correctly on both primary and secondary.
|
||||
|
Loading…
Reference in New Issue
Block a user