[iwhd patch 2/2] Bump testing timeouts

Pete Zaitcev zaitcev at redhat.com
Fri Oct 22 18:20:27 UTC 2010


I have a slow laptop that needs this. Lots of disk activity when testing,
looks like Mongo does not like ext3 much, at least on Fedora 15.

Note that it's preferable for the framework timeout to be greater than
the autostart's own timeout. This way if autostart times out, it kills
mongo that it started, and usually succeeds. But if we let framework
kill things, mongo sometimes escapes.

Also it's weird, but basic usually succeeds quickly enough, so no bump
there - only bump auto and replication.

---
 auto.c        |    2 +-
 t/auto        |    8 ++++----
 t/replication |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

commit 30b19a7cf0dd9fe6292bc5f50e8803bc420f4e6d
Author: Pete Zaitcev <zaitcev at yahoo.com>
Date:   Fri Oct 22 11:57:16 2010 -0600

    Bump timeouts.

diff --git a/auto.c b/auto.c
index c385521..b428bce 100644
--- a/auto.c
+++ b/auto.c
@@ -183,7 +183,7 @@ auto_wait_mongod(void)
 		rc = auto_test_mongod();
 		if (rc == 0)
 			break;
-		if (time(NULL) >= start_time + 5) {
+		if (time(NULL) >= start_time + 20) {
 			error(0, 0, "failed to verify mongod using port %s",
 			      auto_arg_port);
 			return -1;
diff --git a/t/auto b/t/auto
index 86efade..dee4c4e 100644
--- a/t/auto
+++ b/t/auto
@@ -22,11 +22,11 @@ iwhd -v -p $port -a &
 iwhd_pid=$!
 cleanup_() { kill $iwhd_pid; }
 
-# Wait for up to 3 seconds for mongod to begin listening.
-wait_for .1 30 'mongo localhost:$m_port < /dev/null' \
+# Wait for up to 10 seconds for mongod to begin listening.
+wait_for .1 100 'mongo localhost:$m_port < /dev/null' \
   || framework_failure_ mongod failed to start
-# Wait for up to 3 seconds for iwhd to begin listening on $port.
-wait_for .1 30 "curl -s http://localhost:$port" \
+# Wait for up to 20 seconds for iwhd to begin listening on $port.
+wait_for .1 200 "curl -s http://localhost:$port" \
   || framework_failure_ iwhd failed to start
 
 mongo_pid=$(cat mongo.pid)
diff --git a/t/replication b/t/replication
index fc645b8..74423f2 100644
--- a/t/replication
+++ b/t/replication
@@ -18,8 +18,8 @@ mongod --port $m_port --pidfilepath mongod/pid --dbpath mongod > mongod.log 2>&1
 mongo_pid=$!
 cleanup_() { kill -9 $mongo_pid; }
 
-# Wait for up to 3 seconds for mongod to begin listening.
-wait_for .1 30 'mongo localhost:$m_port < /dev/null' \
+# Wait for up to 12 seconds for mongod to begin listening.
+wait_for .1 120 'mongo localhost:$m_port < /dev/null' \
   || framework_failure_ mongod failed to start
 
 cat > iwhd_u.cfg << EOF


More information about the iwhd-devel mailing list