From 823a3e4929a62944e20ab808fc6324692d89ae68 Mon Sep 17 00:00:00 2001 From: Andreas Nilsson Date: Wed, 29 Jan 2014 10:16:39 -0500 Subject: SERVER-12383 Add upper bound for userCacheInvalidationInterval --- jstests/auth/mongos_cache_invalidation.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'jstests/auth/mongos_cache_invalidation.js') 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 -- cgit v1.2.1