You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2018/10/21 11:27:46 UTC

svn commit: r1844482 - in /httpd/test/framework/trunk/t/modules: proxy.t proxy_fcgi.t

Author: rjung
Date: Sun Oct 21 11:27:46 2018
New Revision: 1844482

URL: http://svn.apache.org/viewvc?rev=1844482&view=rev
Log:
Sporadically UDS tests fail due to accept
not (yet) working. Maybe the unix socket
is not ready yet when the client tries to
connect. So give it a bit more time.

Modified:
    httpd/test/framework/trunk/t/modules/proxy.t
    httpd/test/framework/trunk/t/modules/proxy_fcgi.t

Modified: httpd/test/framework/trunk/t/modules/proxy.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/proxy.t?rev=1844482&r1=1844481&r2=1844482&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/proxy.t (original)
+++ httpd/test/framework/trunk/t/modules/proxy.t Sun Oct 21 11:27:46 2018
@@ -146,6 +146,8 @@ sub uds_script
     socket(my $server, PF_UNIX, SOCK_STREAM, 0) || die "socket: $!";
     bind($server, $sock_addr) || die "bind: $!";
     listen($server,1024) || die "listen: $!";
+    open(MARKER, '>', $socket_path.'.marker') or die "Unable to open file $socket_path.marker : $!";
+    close(MARKER);
     if (accept(my $new_sock, $server)) {
         my $data = <$new_sock>;
         print $new_sock "HTTP/1.0 200 OK\r\n";
@@ -154,6 +156,7 @@ sub uds_script
         close $new_sock;
     }
     unlink($socket_path);
+    unlink($socket_path.'.marker');
 }
 
 if (have_min_apache_version('2.4.7')) {
@@ -169,10 +172,11 @@ if (have_min_apache_version('2.4.7')) {
         uds_script($socket_path);
         exit;
     }
-    unless (Misc::cwait('-e "'.$socket_path.'"')) {
+    unless (Misc::cwait('-e "'.$socket_path.'.marker"', 10, 50)) {
         ok 0;
         exit;
     }
+    sleep(1);
     $r = GET("/uds/");
     ok t_cmp($r->code, 200, "ProxyPass UDS path");
     my $c = $r->content;

Modified: httpd/test/framework/trunk/t/modules/proxy_fcgi.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/proxy_fcgi.t?rev=1844482&r1=1844481&r2=1844482&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/proxy_fcgi.t (original)
+++ httpd/test/framework/trunk/t/modules/proxy_fcgi.t Sun Oct 21 11:27:46 2018
@@ -241,10 +241,11 @@ if (have_module('actions')) {
             exit;
         }
         # Wait for php-fpm to start-up
-        unless ( Misc::cwait('-e "'.$pid_file.'"') ) {
+        unless ( Misc::cwait('-e "'.$pid_file.'"', 10, 50) ) {
             ok 0;
             exit;
         }
+        sleep(1);
         $envs = run_fcgi_envvar_request(0, "/php/fpm/action/sub2/test.php/foo/bar?query", "PHP-FPM");
         ok t_cmp($envs->{'SCRIPT_NAME'}, '/php/fpm/action/sub2/test.php',
                 "Handler PHP-FPM sets correct SCRIPT_NAME");