diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2015-07-07 15:23:17 -0400 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2015-07-07 15:23:17 -0400 |
commit | e9a8e1eda6a34d60c49c0998684ff15b1d72d0f4 (patch) | |
tree | 59d7558a7dec1400ea5f955ac8207da78a75e5ec /jstests/concurrency/fsm_libs | |
parent | b373e66d9aca09e73040c8bbeb54bacdb91883fb (diff) | |
download | mongo-e9a8e1eda6a34d60c49c0998684ff15b1d72d0f4.tar.gz |
SERVER-19262 Split Concurrency test suite into 3:
- Concurrency
- Concurrency_replication
- Concurrency_sharded
Diffstat (limited to 'jstests/concurrency/fsm_libs')
-rw-r--r-- | jstests/concurrency/fsm_libs/worker_thread.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/jstests/concurrency/fsm_libs/worker_thread.js b/jstests/concurrency/fsm_libs/worker_thread.js index 9276daa88ef..c2e4cb87509 100644 --- a/jstests/concurrency/fsm_libs/worker_thread.js +++ b/jstests/concurrency/fsm_libs/worker_thread.js @@ -27,10 +27,12 @@ var workerThread = (function() { if (Cluster.isStandalone(args.clusterOptions)) { myDB = db.getSiblingDB(args.dbName); } else { - // The implicit database connection created within the thread's scope - // is unneeded, so forcibly clean it up - db = null; - gc(); + if (typeof db !== 'undefined') { + // The implicit database connection created within the thread's scope + // is unneeded, so forcibly clean it up. + db = null; + gc(); + } myDB = new Mongo(args.host).getDB(args.dbName); } |