diff options
author | Robert Guo <robertguo@me.com> | 2016-08-01 14:50:17 -0400 |
---|---|---|
committer | Robert Guo <robertguo@me.com> | 2016-08-01 14:50:17 -0400 |
commit | 9c4cfabef9766f82798e7361823a3b2284604ccd (patch) | |
tree | f9733b23e37a88ad9e6372b99b5630cbb08727d1 | |
parent | 00d5d8d3e25dc15c08c39573896cbc8716098dad (diff) | |
download | mongo-9c4cfabef9766f82798e7361823a3b2284604ccd.tar.gz |
SERVEWR-25212 work around unique indexes in work around for stale dbhash
-rw-r--r-- | jstests/hooks/check_repl_dbhash.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jstests/hooks/check_repl_dbhash.js b/jstests/hooks/check_repl_dbhash.js index 423720d9a72..23a1cfab8e9 100644 --- a/jstests/hooks/check_repl_dbhash.js +++ b/jstests/hooks/check_repl_dbhash.js @@ -258,8 +258,9 @@ function checkDBHashes(rst, dbBlacklist = [], phase = 'after test hook') { // collections. if (!collName.startsWith('system.') || collName === 'system.js' || collName === 'system.users') - assert.writeOK( - primaryConfigDb.getCollection(collName).insert({invalidate: 'cache'})); + // This insert can fail if there's a unique index on the collection, so we can't + // check the return value. + primaryConfigDb.getCollection(collName).insert({invalidate: 'cache'}); } // Lock the primary to prevent the TTL monitor from deleting expired documents in @@ -285,4 +286,4 @@ function checkDBHashes(rst, dbBlacklist = [], phase = 'after test hook') { } } } -}
\ No newline at end of file +} |