Created
November 14, 2008 23:26
-
-
Save nkallen/25141 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test "Stale objects are expired, but served from cache for a grace period" | |
shell "/Users/pivotal/workspace/freshyfresh/target/memset version:test 2" | |
server s { | |
rxreq | |
expect req.url == "/" | |
txresp -status 200 -hdr "ETag: 1" -hdr "X-Generation-Key: version:test" | |
} -start | |
varnish v -vcl+backend { | |
include "/usr/local/etc/varnish/default.vcl"; | |
} -start | |
client c1 { | |
txreq -req GET -url "/" | |
rxresp | |
expect resp.http.ETag == "1" | |
} -run | |
server s { | |
rxreq | |
sema r1 sync 3 | |
expect req.http.X-First-Client == "c2" | |
sema r2 sync 2 | |
txresp -status 200 -hdr "ETag: 2" -hdr "X-Generation-Key: version:test" -hdr "Connection: close" | |
} -start | |
client c2 { | |
txreq -req GET -url "/" -hdr "X-First-Client: c2" | |
sema r1 sync 3 | |
rxresp | |
expect resp.http.ETag == "2" | |
} -start | |
client c3 { | |
sema r1 sync 3 | |
txreq -req GET -url "/" -hdr "X-First-Client: c3" | |
rxresp | |
sema r2 sync 2 | |
expect resp.http.ETag == "1" | |
} -start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment