You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2010/06/07 23:16:53 UTC

svn commit: r952443 - /httpd/test/framework/trunk/t/apache/pr17629.t

Author: jorton
Date: Mon Jun  7 21:16:50 2010
New Revision: 952443

URL: http://svn.apache.org/viewvc?rev=952443&view=rev
Log:
- make more robust against failure cases

Modified:
    httpd/test/framework/trunk/t/apache/pr17629.t

Modified: httpd/test/framework/trunk/t/apache/pr17629.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/apache/pr17629.t?rev=952443&r1=952442&r2=952443&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/apache/pr17629.t (original)
+++ httpd/test/framework/trunk/t/apache/pr17629.t Mon Jun  7 21:16:50 2010
@@ -5,7 +5,7 @@ use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
 
-plan tests => 2, need [qw(cgi include deflate case_filter)];
+plan tests => 4, need [qw(cgi include deflate case_filter)];
 my $inflator = "/modules/deflate/echo_post";
 
 my @deflate_headers;
@@ -32,11 +32,20 @@ my $expected = "begin-foobar-end\n";
 
 ok t_cmp($content, $expected);
 
-$content = GET_BODY($uri, @deflate_headers);
+my $r = GET($uri, @deflate_headers);
 
-my $deflated = POST_BODY($inflator, @inflate_headers,
-                         content => $content);
+ok t_cmp($r->code, 200);
 
-ok t_cmp($deflated, $expected);
+my $renc = $r->header("Content-Encoding") || "";
 
+ok t_cmp($renc, "gzip", "response was gzipped");
 
+if ($renc eq "gzip") {
+    my $deflated = POST_BODY($inflator, @inflate_headers,
+                             content => $r->content);
+    
+    ok t_cmp($deflated, $expected);
+}
+else {
+    skip "response not gzipped";
+}



Re: svn commit: r952443 - /httpd/test/framework/trunk/t/apache/pr17629.t

Posted by Joe Orton <jo...@redhat.com>.
On Wed, Jun 16, 2010 at 08:16:11PM +0200, Rainer Jung wrote:
> On 07.06.2010 23:16, jorton@apache.org wrote:
> >--- httpd/test/framework/trunk/t/apache/pr17629.t (original)
> >+++ httpd/test/framework/trunk/t/apache/pr17629.t Mon Jun  7 21:16:50 2010
> >@@ -5,7 +5,7 @@ use Apache::Test;
> >  use Apache::TestUtil;
> >  use Apache::TestRequest;
> >
> >-plan tests =>  2, need [qw(cgi include deflate case_filter)];
> >+plan tests =>  4, need [qw(cgi include deflate case_filter)];
> 
> Would it be OK to allow cgid here too? Like

Ah yes thanks, I forget that - please do fix as you suggest! Joe

Re: svn commit: r952443 - /httpd/test/framework/trunk/t/apache/pr17629.t

Posted by Rainer Jung <ra...@kippdata.de>.
Hi Joe,

On 07.06.2010 23:16, jorton@apache.org wrote:
> Author: jorton
> Date: Mon Jun  7 21:16:50 2010
> New Revision: 952443
>
> URL: http://svn.apache.org/viewvc?rev=952443&view=rev
> Log:
> - make more robust against failure cases
>
> Modified:
>      httpd/test/framework/trunk/t/apache/pr17629.t
>
> Modified: httpd/test/framework/trunk/t/apache/pr17629.t
> URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/apache/pr17629.t?rev=952443&r1=952442&r2=952443&view=diff
> ==============================================================================
> --- httpd/test/framework/trunk/t/apache/pr17629.t (original)
> +++ httpd/test/framework/trunk/t/apache/pr17629.t Mon Jun  7 21:16:50 2010
> @@ -5,7 +5,7 @@ use Apache::Test;
>   use Apache::TestUtil;
>   use Apache::TestRequest;
>
> -plan tests =>  2, need [qw(cgi include deflate case_filter)];
> +plan tests =>  4, need [qw(cgi include deflate case_filter)];

Would it be OK to allow cgid here too? Like

--- ./t/apache/pr17629.t        2010-06-07 23:16:50.000000000 +0200
+++ ./t/apache/pr17629.t        2010-06-16 20:05:10.000000000 +0200
@@ -5,7 +5,7 @@
  use Apache::TestUtil;
  use Apache::TestRequest;

-plan tests => 4, need [qw(cgi include deflate case_filter)];
+plan tests => 4, need [need_cgi, qw(include deflate case_filter)];
  my $inflator = "/modules/deflate/echo_post";

  my @deflate_headers;

Just noticed this, when running the 2.3.6 tests with threaded MPMs. If 
that's OK I'll fix like shown above. The same for t/apache/pr43939.t.

Rainer