summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2015-09-09 13:02:40 -0400
committerGabriel Russell <gabriel.russell@mongodb.com>2015-09-11 15:28:29 -0400
commit45e9795072da77482de16cf6bf10bf96c57114ca (patch)
treeb7cf4892bab0efcecc7a37699be13fdbcfbb7336 /test
parenta7f70012b532d09d430d2379d10a9d28f18b80ce (diff)
downloadmongo-45e9795072da77482de16cf6bf10bf96c57114ca.tar.gz
TOOLS-777 wait better for mongod to be gone
Diffstat (limited to 'test')
-rw-r--r--test/qa-tests/jstests/stat/stat_discover.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/qa-tests/jstests/stat/stat_discover.js b/test/qa-tests/jstests/stat/stat_discover.js
index 0ff68aa51c6..9ff7dfa08ad 100644
--- a/test/qa-tests/jstests/stat/stat_discover.js
+++ b/test/qa-tests/jstests/stat/stat_discover.js
@@ -92,10 +92,21 @@ assert(statOutputPortCheck([ rs.liveNodes.slaves[0].port ]), "after discovered i
rs.stop(rs.liveNodes.slaves[1]);
-clearRawMongoProgramOutput();
+assert.soon( function() {
+ try {
+ conn = new Mongo(rs.liveNodes.slaves[1].host);
+ return false;
+ } catch( e ) {
+ return true;
+ }
+ return false;
+}, "mongod still available after being stopped "+ rs.liveNodes.slaves[1].host);
+
+sleep(1000);
-sleep(15000)
+clearRawMongoProgramOutput();
+sleep(2000)
assert(!statOutputPortCheck([ rs.liveNodes.slaves[1].port ]), "after specified host is stopped, specified host is not seen");