[PATCH] iwhd --auto: increase timeout to allow for longer mongod start-up delay

Jim Meyering meyering at redhat.com
Fri Feb 24 16:41:25 UTC 2012


These changes avoid the failure of the t/auto test when run via
"make -j$N check" for nontrivial $N.
* auto.c (auto_wait_mongod): Increase timeout from 20s to 30s,
to accommodate longer delay required for mongod to start, in case it
performs journal initialization, as is now the default in Fedora 16.
* t/auto: Likewise.
---
 auto.c |    2 +-
 t/auto |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/auto.c b/auto.c
index cd54d88..64f6a9a 100644
--- a/auto.c
+++ b/auto.c
@@ -184,7 +184,7 @@ auto_wait_mongod(void)
 		rc = auto_test_mongod();
 		if (rc == 0)
 			break;
-		if (time(NULL) >= start_time + 20) {
+		if (time(NULL) >= start_time + 30) {
 			log_msg(0, _("failed to verify mongod using port %s"),
 				auto_arg_port);
 			return -1;
diff --git a/t/auto b/t/auto
index c8d4ee3..5f7092d 100755
--- a/t/auto
+++ b/t/auto
@@ -24,7 +24,7 @@ cleanup_() { kill $iwhd_pid; }

 # Wait longer than usual (i.e., don't use wait_for_mongo), since this
 # mongo daemon was started via iwhd itself, and not with $mongo_opt
-wait_for .1 100 'mongo localhost:$m_port < /dev/null' \
+wait_for .1 300 'mongo localhost:$m_port < /dev/null' \
   || framework_failure_ mongod failed to start
 # Wait for up to 20 seconds for iwhd to begin listening on $port.
 wait_for .1 200 "curl -s http://localhost:$port" \
--
1.7.9.2.263.g9be8b7


More information about the iwhd-devel mailing list