Split this test into tcp and uds

The former fails in some platforms but we can test the latter.
parent 06e7329d
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
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment