~ubuntu-branches/ubuntu/lucid/varnish/lucid-updates

« back to all changes in this revision

Viewing changes to bin/varnishtest/tests/r00667.vtc

  • Committer: Bazaar Package Importer
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2010-03-24 13:26:08 UTC
  • mfrom: (0.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100324132608-4uzkavctn26bdwyi
Tags: 2.1.0-1
* New upstream version
* Fix small error in man/vcl.7so

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: r00667.vtc 4632 2010-03-18 11:14:36Z phk $
 
2
 
 
3
test "things stuck on busy object"
 
4
 
 
5
server s1 {
 
6
        rxreq
 
7
        sema r1 sync 2
 
8
        delay 1
 
9
        # There is a race in varnish between the first request releasing
 
10
        # the backend connection, and the second request trying to get it
 
11
        # which makes reuse of backend connection sometimes work and
 
12
        # sometimes not.  Solve by never reusing the backend connection.
 
13
        txresp -hdr "Connection: close" -bodylen 2
 
14
        expect_close
 
15
        accept
 
16
        rxreq
 
17
        txresp -bodylen 5
 
18
} -start
 
19
 
 
20
 
 
21
varnish v1 -vcl+backend {
 
22
        sub vcl_fetch {
 
23
                set beresp.cacheable = false;
 
24
        }
 
25
} -start
 
26
 
 
27
 
 
28
client c1 {
 
29
        txreq
 
30
        rxresp
 
31
        expect resp.bodylen == 2
 
32
} -start
 
33
 
 
34
client c2 {
 
35
        sema r1 sync 2
 
36
        txreq
 
37
        rxresp
 
38
        expect resp.bodylen == 5
 
39
} -start
 
40
 
 
41
client c1 -wait
 
42
client c2 -wait