summaryrefslogtreecommitdiff
path: root/dbtests
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2011-04-19 14:16:44 -0400
committerMathias Stearn <mathias@10gen.com>2011-04-19 14:16:44 -0400
commite2ff53f6931ed0af937492a2e45bd2e6db27afa6 (patch)
tree4b7d8b4600aef4c93770a3953d2a35a867f028f5 /dbtests
parentd7d2ce01f56510a792d53982ced313318a1f5ce4 (diff)
downloadmongo-e2ff53f6931ed0af937492a2e45bd2e6db27afa6.tar.gz
Try to make MongoMutexTest faster in _DEBUG builds
Diffstat (limited to 'dbtests')
-rw-r--r--dbtests/threadedtests.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/dbtests/threadedtests.cpp b/dbtests/threadedtests.cpp
index 973bb60eb96..51fad6e0d49 100644
--- a/dbtests/threadedtests.cpp
+++ b/dbtests/threadedtests.cpp
@@ -68,6 +68,14 @@ namespace ThreadedTests {
public:
MongoMutexTest() : pm(N * nthreads) {}
void run() {
+ DEV {
+ // in _DEBUG builds on linux we mprotect each time a writelock
+ // is taken. That can greatly slow down this test if there are
+ // many open files
+ DBDirectClient db;
+ db.simpleCommand("admin", NULL, "closeAllDatabases");
+ }
+
Timer t;
cout << "MongoMutexTest N:" << N << endl;
ThreadedTest<135>::run();