diff options
author | Judah Schvimer <judah@mongodb.com> | 2018-02-01 17:43:51 -0500 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2018-02-13 13:28:07 -0500 |
commit | 1e2160c8f0480a1d8be1d671b5b7e22e52986a2c (patch) | |
tree | 84f09b2c9f48c1848b08caa38cdd8a679a7a9d52 /jstests | |
parent | 358dfccf9f896116ac7d79772f91cb604672175a (diff) | |
download | mongo-1e2160c8f0480a1d8be1d671b5b7e22e52986a2c.tar.gz |
SERVER-32989 prevents `repairDatabase` race with `dropDatabase`
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/replsets/drop_databases_two_phase.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/replsets/drop_databases_two_phase.js b/jstests/replsets/drop_databases_two_phase.js index aa4aae61b82..4add7d66fe6 100644 --- a/jstests/replsets/drop_databases_two_phase.js +++ b/jstests/replsets/drop_databases_two_phase.js @@ -111,12 +111,16 @@ jsTestLog('Primary ' + primary.host + ' successfully started two phase drop of collection ' + collToDrop.getFullName()); - // Collection creation should fail with an error of ErrorCodes.DatabaseDropPending while the - // database is in a drop pending state. + // Collection creation and repair database should fail with an error of + // ErrorCodes.DatabaseDropPending while the database is in a drop pending state. assert.commandFailedWithCode( dbToDrop.createCollection('collectionToCreateWhileDroppingDatabase'), ErrorCodes.DatabaseDropPending, 'collection creation should fail while we are in the process of dropping the database'); + assert.commandFailedWithCode( + dbToDrop.repairDatabase(), + ErrorCodes.DatabaseDropPending, + 'repairDatabase should fail while we are in the process of dropping the database'); /** * DROP DATABASE 'Database' PHASE |