diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-01-24 10:42:55 -0500 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2013-01-24 10:58:10 -0500 |
commit | 2216a1e75b1cb540a6974d72cd52bbaac8e46adf (patch) | |
tree | 035d69feded9c7c699b6f011d849fd444c614e6b | |
parent | a7019403d3c6cb2f4f8b261c7789d52ccc154da4 (diff) | |
download | mongo-2216a1e75b1cb540a6974d72cd52bbaac8e46adf.tar.gz |
SERVER-8249 Maintain references to permanent connections created in connections_opened.js
-rw-r--r-- | jstests/connections_opened.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/connections_opened.js b/jstests/connections_opened.js index 6a4a756a40b..6edf3eaeedf 100644 --- a/jstests/connections_opened.js +++ b/jstests/connections_opened.js @@ -4,7 +4,7 @@ var testDB = 'connectionsOpenedTest'; var signalCollection = 'keepRunning'; function createPersistentConnection() { - new Mongo(db.getMongo().host); + return new Mongo(db.getMongo().host); } function createTemporaryConnection() { @@ -37,8 +37,9 @@ assert.gt(originalConnInfo.current, 0); assert.gt(originalConnInfo.totalCreated, 0); jsTestLog("Creating persistent connections"); +var permConns = []; for (var i = 0; i < 100; i++) { - createPersistentConnection(); + permConns.push(createPersistentConnection()); } jsTestLog("Testing that persistent connections increased the current and totalCreated counters"); |