Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
61dc72e0
Commit
61dc72e0
authored
Aug 31, 2018
by
Pål Hermunn Johansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stabilize b000064.vtc for real
Fixes: #2753
parent
cf04d394
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
b00064.vtc
bin/varnishtest/tests/b00064.vtc
+12
-5
No files found.
bin/varnishtest/tests/b00064.vtc
View file @
61dc72e0
...
...
@@ -38,8 +38,11 @@ varnish v1 -vcl+backend {
set req.http.X-grace = obj.grace;
}
sub vcl_backend_response {
set beresp.ttl =
0.1
s;
set beresp.ttl =
1m
s;
set beresp.grace = 1m;
if (bereq.is_bgfetch) {
set beresp.http.X-was-bgfetch = "1";
}
}
sub vcl_deliver {
if (req.http.X-grace) {
...
...
@@ -65,6 +68,7 @@ client c1 {
expect resp.body == "1"
expect resp.http.X-grace == <undef>
expect resp.http.X-req-grace == <undef>
expect resp.http.X-was-bgfetch == <undef>
} -run
# let the latest object's ttl expire.
...
...
@@ -81,11 +85,13 @@ client c2 {
expect resp.body == "1"
expect resp.http.X-grace == "60.000"
expect resp.http.X-req-grace < 0.
} -start
expect resp.http.X-was-bgfetch == <undef>
} -run
delay .2
# c3 asks for graced object, but now we disable grace. The c2 client
# started the background fetch, which will take a long time (until c4
# has gotten its reply).
# c3 asks for graced object, but now we disable grace.
client c3 {
txreq -hdr "X-no-grace: true"
rxresp
...
...
@@ -95,6 +101,7 @@ client c3 {
expect resp.body == "2"
expect resp.http.X-grace == "60.000"
expect resp.http.X-req-grace == "0.000"
expect resp.http.X-was-bgfetch == "1"
} -start
delay .1
...
...
@@ -112,9 +119,9 @@ client c4 {
expect resp.body == "1"
expect resp.http.X-grace == "60.000"
expect resp.http.X-req-grace < 0.
expect resp.http.X-was-bgfetch == <undef>
} -start
client c2 -wait
client c3 -wait
client c4 -wait
...
...
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