After the test-script fork()s, the client half now sleeps for two
authorMike Taylor <mike@indexdata.com>
Wed, 16 Mar 2011 14:32:54 +0000 (14:32 +0000)
committerMike Taylor <mike@indexdata.com>
Wed, 16 Mar 2011 14:32:54 +0000 (14:32 +0000)
seconds rather then one: the old sleep(1) doesn't seem to reliably
give long enough for all four of the servers to get started up in the
Debian package-building process (id-pbuild.sh) on squeeze, so that
nearly always at least one of the four builds hangs in the test suite,
with the sever waiting for an already-dead client to connect.  And
that means that the whole build fails.  Hopefully this will fix that.

test.pl

diff --git a/test.pl b/test.pl
index 7c28f91..b5561d9 100644 (file)
--- a/test.pl
+++ b/test.pl
@@ -98,7 +98,7 @@ if (!defined($pid = fork() )) {
 
        $handler->launch_server("test.pl", "-1", @ARGV);
 } else {                                               ## Child starts the client
-       sleep(1);
+       sleep(2);
        open(CLIENT, "| yaz-client tcp:localhost:9999 > /dev/null")
                or die "Couldn't fork client: $!\n";
        print CLIENT "f test\n";