[master] e6717f5ac Split this test into tcp and uds
Federico G. Schwindt
fgsch at lodoss.net
Sun May 5 08:15:13 UTC 2019
commit e6717f5acb7c851f4469eebe10cc02f0702e8ce6
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Sun May 5 01:18:37 2019 +0100
Split this test into tcp and uds
The former fails in some platforms but we can test the latter.
diff --git a/bin/varnishtest/tests/s00010.vtc b/bin/varnishtest/tests/s00010.vtc
index 81dbfee00..169ffa8d1 100644
--- a/bin/varnishtest/tests/s00010.vtc
+++ b/bin/varnishtest/tests/s00010.vtc
@@ -1,7 +1,9 @@
-varnishtest "client h1 send timeouts"
+varnishtest "client h1 send timeouts - tcp"
# XXX See https://github.com/varnishcache/varnish-cache/pull/2980#issuecomment-486214661
-feature cmd {test $(uname) != "SunOS"}
+feature cmd {test $(uname) != "SunOS" && test $(uname) != "Darwin"}
+
+feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
@@ -13,7 +15,6 @@ varnish v1 \
-arg "-p idle_send_timeout=.1" \
-arg "-p send_timeout=.1" \
-arg "-a 127.0.0.1:0" \
- -arg "-a ${tmpdir}/v1.sock" \
-vcl+backend {
import debug;
@@ -24,7 +25,6 @@ varnish v1 \
logexpect l1 -v v1 {
expect * * Debug "Hit total send timeout"
- expect * * Debug "Hit total send timeout"
} -start
client c1 -rcvbuf 128 {
@@ -35,25 +35,14 @@ client c1 -rcvbuf 128 {
delay 2
} -start
-client c1u -connect "${tmpdir}/v1.sock" -rcvbuf 128 {
- txreq
- non_fatal
- rxresphdrs
- # keep the session open for 2 seconds
- delay 2
-} -start
-
client c1 -wait
-client c1u -wait
logexpect l1 -wait
-feature SO_RCVTIMEO_WORKS
varnish v1 -cliok "param.set idle_send_timeout 1"
varnish v1 -cliok "param.reset send_timeout"
logexpect l2 -v v1 {
expect * * Debug "Hit idle send timeout"
- expect * * Debug "Hit idle send timeout"
} -start
client c2 -rcvbuf 128 {
@@ -63,13 +52,5 @@ client c2 -rcvbuf 128 {
delay 2
} -start
-client c2u -connect "${tmpdir}/v1.sock" -rcvbuf 128 {
- txreq
- rxresphdrs
- # keep the session open for 2 seconds
- delay 2
-} -start
-
client c2 -wait
-client c2u -wait
logexpect l2 -wait
diff --git a/bin/varnishtest/tests/s00012.vtc b/bin/varnishtest/tests/s00012.vtc
new file mode 100644
index 000000000..392cb2830
--- /dev/null
+++ b/bin/varnishtest/tests/s00012.vtc
@@ -0,0 +1,53 @@
+varnishtest "client h1 send timeouts - uds"
+
+feature SO_RCVTIMEO_WORKS
+
+server s1 {
+ rxreq
+ txresp -bodylen 100000
+} -start
+
+varnish v1 \
+ -arg "-p timeout_idle=1" \
+ -arg "-p idle_send_timeout=.1" \
+ -arg "-p send_timeout=.1" \
+ -arg "-a ${tmpdir}/v1.sock" \
+ -vcl+backend {
+ import debug;
+
+ sub vcl_deliver {
+ debug.sndbuf(128b);
+ }
+} -start
+
+logexpect l1 -v v1 {
+ expect * * Debug "Hit total send timeout"
+} -start
+
+client c1 -connect "${tmpdir}/v1.sock" -rcvbuf 128 {
+ txreq
+ non_fatal
+ rxresphdrs
+ # keep the session open for 2 seconds
+ delay 2
+} -start
+
+client c1 -wait
+logexpect l1 -wait
+
+varnish v1 -cliok "param.set idle_send_timeout 1"
+varnish v1 -cliok "param.reset send_timeout"
+
+logexpect l2 -v v1 {
+ expect * * Debug "Hit idle send timeout"
+} -start
+
+client c2 -connect "${tmpdir}/v1.sock" -rcvbuf 128 {
+ txreq
+ rxresphdrs
+ # keep the session open for 2 seconds
+ delay 2
+} -start
+
+client c2 -wait
+logexpect l2 -wait
More information about the varnish-commit
mailing list