[PATCH] tests: adapt to mongod's new default of using --journal

Jim Meyering jim at meyering.net
Thu Feb 23 21:29:16 UTC 2012


Pete Zaitcev wrote:
> On Thu, 23 Feb 2012 21:37:45 +0100
> Jim Meyering <jim at meyering.net> wrote:
>
>> Here's the incremental:
>
> Looks good, I ACK the combination. I'm still running tests though,
> I did not hit the failure on F16 that we were addressing with this
> patch. Maybe my disk is magically fast.

Thanks.

Which version of mongodb are you using?
For me, F16's recent mongodb-2.0.2-8.fc16.x86_64 is the
first version for which I noticed this problem.

If I raise the timeout in auto.c from 20s to 30s
and the one in t/auto from 10 to 30, all tests pass.
Otherwise, t/auto usually fails when run via "make -j10 check"
on a 6-core system.

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" \


More information about the iwhd-devel mailing list