[master] b2e9410 Improve stability of these two testcases.
Poul-Henning Kamp
phk at FreeBSD.org
Sun May 17 10:28:22 CEST 2015
commit b2e94101c293843125f48f6ad22a5c6d98b69c55
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sun May 17 08:27:37 2015 +0000
Improve stability of these two testcases.
We have to restart the server instance when we have writes which
might fail.
diff --git a/bin/varnishtest/tests/r00942.vtc b/bin/varnishtest/tests/r00942.vtc
index 164234d..0497413 100644
--- a/bin/varnishtest/tests/r00942.vtc
+++ b/bin/varnishtest/tests/r00942.vtc
@@ -1,6 +1,6 @@
varnishtest "#942 junk after gzip from backend"
-server s1 -repeat 2 {
+server s1 {
rxreq
txresp -nolen \
-hdr "Content-Encoding: gzip" \
@@ -18,13 +18,9 @@ server s1 -repeat 2 {
sendhex "00000000"
sendhex "00000000"
send "\r\n"
-
chunked "FOOBAR"
-
non-fatal
chunkedlen 0
- accept
- fatal
} -start
varnish v1 \
@@ -46,6 +42,31 @@ client c1 {
expect resp.status == 503
} -run
+server s1 -wait {
+ fatal
+ rxreq
+ txresp -nolen \
+ -hdr "Content-Encoding: gzip" \
+ -hdr "Connection: close" \
+ -hdr "Transfer-Encoding: Chunked"
+ send "14\r\n"
+ # An empty gzip file:
+ sendhex "1f8b"
+ sendhex "08"
+ sendhex "00"
+ sendhex "00000000"
+ sendhex "00"
+ sendhex "03"
+ sendhex "0300"
+ sendhex "00000000"
+ sendhex "00000000"
+ send "\r\n"
+ chunked "FOOBAR"
+ non-fatal
+ chunkedlen 0
+} -start
+
+
client c1 {
txreq -url /2 -hdr "Foo: foo"
rxresp
diff --git a/bin/varnishtest/tests/r01086.vtc b/bin/varnishtest/tests/r01086.vtc
index 2dd6e2b..79c5128 100644
--- a/bin/varnishtest/tests/r01086.vtc
+++ b/bin/varnishtest/tests/r01086.vtc
@@ -22,11 +22,30 @@ server s1 {
delay .2
- non-fatal
chunked "FOOBAR"
+ non-fatal
chunkedlen 0
+} -start
+
+
+varnish v1 -vcl+backend {
+ sub vcl_backend_response {
+ if (beresp.http.set-cookie == "BAR") {
+ set beresp.do_stream = false;
+ }
+ }
+} -start
+
+client c1 {
+ txreq -hdr "Cookie: FOO"
+ rxresphdrs
+ expect resp.status == 200
+ expect_close
+} -run
+
+delay .1
- accept
+server s1 -wait {
fatal
# This one will not be streamed
@@ -50,32 +69,13 @@ server s1 {
delay .2
- non-fatal
chunked "FOOBAR"
+ non-fatal
chunkedlen 0
- accept
-
-} -start
-
-varnish v1 -vcl+backend {
- sub vcl_backend_response {
- if (beresp.http.set-cookie == "BAR") {
- set beresp.do_stream = false;
- }
- }
} -start
client c1 {
- txreq -hdr "Cookie: FOO"
- rxresphdrs
- expect resp.status == 200
- expect_close
-} -run
-
-delay .1
-
-client c1 {
txreq -hdr "Cookie: BAR"
rxresp
expect resp.status == 503
More information about the varnish-commit
mailing list