Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-backend_dyn
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carl P. Corliss
libvmod-backend_dyn
Commits
933904ad
Commit
933904ad
authored
Nov 07, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test c00013.vtc
parent
52937fab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
c00013.vtc
src/tests/c00013.vtc
+62
-0
No files found.
src/tests/c00013.vtc
0 → 100644
View file @
933904ad
varnishtest "Test parking second request on backend delay"
server s1 {
rxreq
expect req.url == "/foo"
send "HTTP/1.0 200 OK\r\nConnection: close\r\n\r\n"
delay .2
sema r1 sync 2
delay .2
send "line1\n"
delay .2
sema r1 sync 2
send "line2\n"
} -start
varnish v1 -vcl {
import backend_dyn from "${vmod_topbuild}/src/.libs/libvmod_backend_dyn.so";
backend dummy { .host="${bad_ip}"; }
sub vcl_init {
if (!backend_dyn.create(name="be", host="${s1_addr}",
port="${s1_port}")) {
return(fail);
}
}
sub vcl_backend_fetch {
set bereq.backend = backend_dyn.by_name("be");
}
sub vcl_backend_response {
set beresp.do_stream = false;
}
} -start
varnish v1 -cliok "param.set debug +syncvsl"
client c1 {
txreq -url "/foo" -hdr "client: c1"
rxresp
expect resp.status == 200
expect resp.bodylen == 12
expect resp.http.x-varnish == "1001"
} -start
sema r1 sync 2
client c2 {
txreq -url "/foo" -hdr "client: c2"
delay .2
sema r1 sync 2
rxresp
expect resp.status == 200
expect resp.bodylen == 12
expect resp.http.x-varnish == "1004 1002"
} -run
client c1 -wait
varnish v1 -expect busy_sleep == 1
varnish v1 -expect busy_wakeup == 1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment