summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@10gen.com>2013-01-24 10:42:55 -0500
committerSpencer T Brody <spencer@10gen.com>2013-01-24 10:58:10 -0500
commit2216a1e75b1cb540a6974d72cd52bbaac8e46adf (patch)
tree035d69feded9c7c699b6f011d849fd444c614e6b
parenta7019403d3c6cb2f4f8b261c7789d52ccc154da4 (diff)
downloadmongo-2216a1e75b1cb540a6974d72cd52bbaac8e46adf.tar.gz
SERVER-8249 Maintain references to permanent connections created in connections_opened.js
-rw-r--r--jstests/connections_opened.js5
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");