summaryrefslogtreecommitdiff
path: root/jstests/slow1
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2017-03-27 11:31:25 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2017-03-27 11:31:25 -0400
commit615ec18852dd7f4f32a1ba0c02c722168ec8fb11 (patch)
tree2f9108b29bffd313d1713c8f0e350a66f2dc5213 /jstests/slow1
parent98515c812b6fa893613f063dae568ff8319cbfbd (diff)
downloadmongo-615ec18852dd7f4f32a1ba0c02c722168ec8fb11.tar.gz
SERVER-27821 Reduce number of roles in chain when running with --dbg=on.
Diffstat (limited to 'jstests/slow1')
-rw-r--r--jstests/slow1/large_role_chain.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/jstests/slow1/large_role_chain.js b/jstests/slow1/large_role_chain.js
index 107263782ef..058f4d8f989 100644
--- a/jstests/slow1/large_role_chain.js
+++ b/jstests/slow1/large_role_chain.js
@@ -6,6 +6,15 @@ function runTest(conn) {
testdb.runCommand({dropAllRolesFromDatabase: 1});
var chainLen = 2000;
+ var buildInfo = conn.getDB("admin").runCommand("buildInfo");
+ assert.commandWorked(buildInfo);
+
+ // We reduce the number of roles linked together in the chain to avoid causing this test to take
+ // a long time with --dbg=on builds.
+ if (buildInfo.debug) {
+ chainLen = 200;
+ }
+
jsTestLog("Generating a chain of " + chainLen + " linked roles");
var roleNameBase = "chainRole";