diff options
Diffstat (limited to 'jstests/noPassthroughWithMongod/connections_opened.js')
-rw-r--r-- | jstests/noPassthroughWithMongod/connections_opened.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/jstests/noPassthroughWithMongod/connections_opened.js b/jstests/noPassthroughWithMongod/connections_opened.js index ecd2076f2af..20c53b0db1d 100644 --- a/jstests/noPassthroughWithMongod/connections_opened.js +++ b/jstests/noPassthroughWithMongod/connections_opened.js @@ -30,12 +30,14 @@ function createPersistentConnection() { function createTemporaryConnection() { // Retry connecting until you are successful - var pollString = "var conn = null;" + "assert.soon(function() {" + "try { conn = new Mongo(\"" + - db.getMongo().host + "\"); return conn" + "} catch (x) {return false;}}, " + + var pollString = "var conn = null;" + + "assert.soon(function() {" + + "try { conn = new Mongo(\"" + db.getMongo().host + "\"); return conn" + + "} catch (x) {return false;}}, " + "\"Timed out waiting for temporary connection to connect\", 30000, 5000);"; // Poll the signal collection until it is told to terminate. - pollString += "assert.soon(function() {" + "return conn.getDB('" + testDB + - "').getCollection('" + signalCollection + "')" + + pollString += "assert.soon(function() {" + + "return conn.getDB('" + testDB + "').getCollection('" + signalCollection + "')" + ".findOne().stop;}, \"Parallel shell never told to terminate\", 10 * 60000);"; return startParallelShell(pollString, null, true); } |