diff options
author | David Bradford <david.bradford@mongodb.com> | 2018-05-09 13:37:58 -0400 |
---|---|---|
committer | David Bradford <david.bradford@mongodb.com> | 2018-08-17 09:32:20 -0400 |
commit | 0d18044aabe790f330e9a625175dbc071bd6fb64 (patch) | |
tree | ec87be7314e3a7c9316415166b43f17fd70059be | |
parent | d2360d5243fa8a19673473c63d114fdf03028a81 (diff) | |
download | mongo-0d18044aabe790f330e9a625175dbc071bd6fb64.tar.gz |
SERVER-34614: Create a new db connection for each test when running in parallel
(cherry picked from commit 7e4f6276ec553354e2b88a209e3000ea7f729513)
-rw-r--r-- | jstests/libs/parallelTester.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/libs/parallelTester.js b/jstests/libs/parallelTester.js index 2837af9ecbd..010715bed40 100644 --- a/jstests/libs/parallelTester.js +++ b/jstests/libs/parallelTester.js @@ -296,6 +296,10 @@ if (typeof _threadInject != "undefined") { args.forEach(function(x) { print(" S" + suite + " Test : " + x + " ..."); var time = Date.timeFunc(function() { + // Create a new connection to the db for each file. If tests share the same + // connection it can create difficult to debug issues. + db = new Mongo(db.getMongo().host).getDB(db.getName()); + gc(); load(x); }, 1); print(" S" + suite + " Test : " + x + " " + time + "ms"); |