summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorRobert Guo <robertguo@me.com>2016-08-01 14:50:17 -0400
committerRobert Guo <robertguo@me.com>2016-08-01 14:50:17 -0400
commit9c4cfabef9766f82798e7361823a3b2284604ccd (patch)
treef9733b23e37a88ad9e6372b99b5630cbb08727d1 /jstests
parent00d5d8d3e25dc15c08c39573896cbc8716098dad (diff)
downloadmongo-9c4cfabef9766f82798e7361823a3b2284604ccd.tar.gz
SERVEWR-25212 work around unique indexes in work around for stale dbhash
Diffstat (limited to 'jstests')
-rw-r--r--jstests/hooks/check_repl_dbhash.js7
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
+}