diff options
author | Eric Milkie <milkie@10gen.com> | 2016-02-22 11:03:01 -0500 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2016-02-22 15:50:21 -0500 |
commit | 02fd42496cb871062d27faf0e419d514fdbb1a9b (patch) | |
tree | d40b25a41a846796f244b1811476dbba1f395a52 /jstests/auth | |
parent | 3850bc6bdf3a9b269b956f697c2abcb4695c3c6e (diff) | |
download | mongo-02fd42496cb871062d27faf0e419d514fdbb1a9b.tar.gz |
SERVER-22796 expand timing for mongos_cache_invalidation.js
Diffstat (limited to 'jstests/auth')
-rw-r--r-- | jstests/auth/mongos_cache_invalidation.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/jstests/auth/mongos_cache_invalidation.js b/jstests/auth/mongos_cache_invalidation.js index b5a2d5eabd5..1f8a03bac56 100644 --- a/jstests/auth/mongos_cache_invalidation.js +++ b/jstests/auth/mongos_cache_invalidation.js @@ -102,7 +102,7 @@ db3.auth('spencer', 'pwd'); assert.writeOK(db1.foo.update({}, { $inc: { a: 1 }})); assert.eq(2, db1.foo.findOne().a); - // s1/db2 should update its cache in 5 seconds. + // s1/db2 should update its cache in 10 seconds. assert.soon(function() { var res = db2.foo.update({}, { $inc: { a: 1 }}); if (res.hasWriteError()) { @@ -110,8 +110,8 @@ db3.auth('spencer', 'pwd'); } return db2.foo.findOne().a == 3; }, - "Mongos did not update its user cache after 5 seconds", - 6 * 1000); // Give an extra 1 second to avoid races + "Mongos did not update its user cache after 10 seconds", + 10 * 1000); // We manually invalidate the cache on s2/db3. db3.adminCommand("invalidateUserCache"); @@ -130,13 +130,14 @@ db3.auth('spencer', 'pwd'); // s0/db1 should update its cache instantly hasAuthzError(db1.foo.update({}, { $inc: { a: 1 }})); - // s1/db2 should update its cache in 5 seconds. + jsTest.log("Beginning wait for s1/db2 cache update."); + // s1/db2 should update its cache in 10 seconds. assert.soon(function() { var res = db2.foo.update({}, { $inc: { a: 1 }}); return res.hasWriteError() && res.getWriteError().code == authzErrorCode; }, - "Mongos did not update its user cache after 5 seconds", - 6 * 1000); // Give an extra 1 second to avoid races + "Mongos did not update its user cache after 10 seconds", + 10 * 1000); // We manually invalidate the cache on s1/db3. db3.adminCommand("invalidateUserCache"); |