diff options
author | Andreas Nilsson <andreas.nilsson@10gen.com> | 2014-01-29 10:16:39 -0500 |
---|---|---|
committer | Andreas Nilsson <andreas.nilsson@10gen.com> | 2014-01-29 10:18:23 -0500 |
commit | 823a3e4929a62944e20ab808fc6324692d89ae68 (patch) | |
tree | 3e6bf609b777be975c3222be7c3430e80b30f55f /jstests/auth/mongos_cache_invalidation.js | |
parent | 4adca0065aff4bd10b317f6fd03cfbb71ae82204 (diff) | |
download | mongo-823a3e4929a62944e20ab808fc6324692d89ae68.tar.gz |
SERVER-12383 Add upper bound for userCacheInvalidationInterval
Diffstat (limited to 'jstests/auth/mongos_cache_invalidation.js')
-rw-r--r-- | jstests/auth/mongos_cache_invalidation.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/jstests/auth/mongos_cache_invalidation.js b/jstests/auth/mongos_cache_invalidation.js index fa63a100ba4..1cedf92c4d9 100644 --- a/jstests/auth/mongos_cache_invalidation.js +++ b/jstests/auth/mongos_cache_invalidation.js @@ -11,7 +11,14 @@ var st = new ShardingTest({ shards: 2, {}], keyFile: 'jstests/libs/key1' }); -var res = st.s1.getDB('admin').runCommand({getParameter: 1, userCacheInvalidationIntervalSecs: 1}); +var res = st.s1.getDB('admin').runCommand({setParameter: 1, userCacheInvalidationIntervalSecs: 29}); +assert.commandFailed(res, "Setting the invalidation interval to an disallowed value should fail"); + +res = st.s1.getDB('admin').runCommand({setParameter: 1, userCacheInvalidationIntervalSecs: 100000}); +assert.commandFailed(res, "Setting the invalidation interval to an disallowed value should fail"); + +res = st.s1.getDB('admin').runCommand({getParameter: 1, userCacheInvalidationIntervalSecs: 1}); + assert.eq(30, res.userCacheInvalidationIntervalSecs); st.s0.getDB('test').foo.insert({a:1}); // initial data |