-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vtc sweep through tight backend workspace conditions
Ref: #2645
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
varnishtest "sweep through tight backend workspace conditions" | ||
|
||
server s1 -repeat 100 { | ||
rxreq | ||
send "HTTP/1.1 200 OK\r\nTransfer-encoding: chunked\r\n\r\n00000004\r\n1234\r\n00000000\r\n\r\n" | ||
} -start | ||
|
||
varnish v1 -vcl+backend { | ||
import vtc; | ||
import std; | ||
sub vcl_recv { | ||
return (pass); | ||
} | ||
sub vcl_backend_fetch { | ||
vtc.workspace_alloc(backend, -4 * | ||
(std.integer(bereq.xid, 1002) - 1000) / 2); | ||
} | ||
} -start | ||
|
||
client c1 -repeat 100 { | ||
txreq -url "/" | ||
# some responses will fail (503), some won't. All we care | ||
# about here is the fact that we don't panic | ||
rxresp | ||
} -run |