summaryrefslogtreecommitdiff
path: root/jstests/dur
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2015-04-07 17:37:17 -0400
committerSpencer T Brody <spencer@mongodb.com>2015-04-08 11:52:52 -0400
commit33f435065bb29f447c3b9b68c87a74a7eb05c58d (patch)
tree79e62d911ab30b7407f18cd2e7a55e933983ffd8 /jstests/dur
parentc5b16b8abf05637dcf35ba2bce8f51a2806a5ff4 (diff)
downloadmongo-33f435065bb29f447c3b9b68c87a74a7eb05c58d.tar.gz
SERVER-17450 SERVER-17932 Fix dur_jscore_passthrough.js to be resilient to tests masking the "conn" variable
Diffstat (limited to 'jstests/dur')
-rw-r--r--jstests/dur/dur_jscore_passthrough.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/jstests/dur/dur_jscore_passthrough.js b/jstests/dur/dur_jscore_passthrough.js
index 30ef17cd44b..c7e562f94d4 100644
--- a/jstests/dur/dur_jscore_passthrough.js
+++ b/jstests/dur/dur_jscore_passthrough.js
@@ -10,6 +10,12 @@ db = conn.getDB("test");
conn.forceWriteMode("commands");
function doTest() {
+ "use strict"
+
+ // Some tests use "conn" and can override the "conn" defined above, so save a copy of it here
+ // in local scope.
+ var myConn = conn.port;
+
var files = listFiles("jstests/core");
files = files.sort(compareOn('name'));
@@ -37,7 +43,7 @@ function doTest() {
}
);
- MongoRunner.stopMongod(conn);
+ MongoRunner.stopMongod(myConn);
var runnerEnd = new Date()