~ubuntu-branches/debian/sid/varnish/sid

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-10-29 15:23:24 UTC
  • mfrom: (0.1.15)
  • Revision ID: package-import@ubuntu.com-20111029152324-tdtlsurrv22ysknj
Tags: 3.0.2-1
* New upstream release
* Build from upstream tarball instead of git tag
* debian/watch: more specific regular expression

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
        rxreq
5
5
        expect req.url == "/"
6
6
        txresp -body "slash"
 
7
        close
 
8
 
 
9
        sema r1 sync 3
 
10
 
 
11
        accept
 
12
        rxreq
 
13
        expect req.url == "/"
 
14
        txresp -body "slash"
 
15
        close
 
16
 
 
17
        accept
 
18
        rxreq
 
19
        expect req.url == "/"
 
20
        txresp -body "slash"
 
21
        close
 
22
 
 
23
        sema r3 sync 2
 
24
 
 
25
        accept
 
26
        rxreq
 
27
        expect req.url == "/foo"
 
28
        txresp -hdr "Foo: 1" -body "foobar"
 
29
 
7
30
} -start
8
31
 
9
32
server s2 {
10
33
        rxreq
11
34
        expect req.url == "/"
12
35
        txresp -body "slash"
 
36
        close
 
37
 
 
38
        sema r1 sync 3
 
39
 
 
40
        accept
 
41
        rxreq
 
42
        expect req.url == "/"
 
43
        txresp -body "slash"
 
44
        close
 
45
 
 
46
        sema r2 sync 2
 
47
 
 
48
        accept
 
49
        rxreq
 
50
        expect req.url == "/foo"
 
51
        txresp -hdr "Foo: 2" -body "foobar"
13
52
} -start
14
53
 
15
54
server s3 {
65
104
        }
66
105
} -start
67
106
 
68
 
# s1 & s2 have both had 1 probe, so both are unhealthy
69
107
 
70
108
client c1 {
 
109
        # s1 & s2 are both sick, expect response from s3
71
110
        txreq -url "/foo"
72
111
        rxresp
73
112
        expect resp.http.foo == "3"
74
 
} -run
75
 
 
76
 
# setup for probe #2
77
 
 
78
 
server s1 {
79
 
        rxreq
80
 
        expect req.url == "/"
81
 
        txresp -body "slash"
82
 
} -start
83
 
 
84
 
server s2 {
85
 
        rxreq
86
 
        expect req.url == "/"
87
 
        txresp -body "slash"
88
 
} -start
89
 
 
90
 
# if we muck with a running server, the test will wait until it's done,
91
 
# which will be after probe #2 completes. b2 will then be healthy.
92
 
 
93
 
server s2 {
94
 
        rxreq
95
 
        expect req.url == "/foo"
96
 
        txresp -hdr "Foo: 2" -body "foobar"
97
 
} -start
98
 
 
99
 
client c1 {
 
113
 
 
114
        sema r1 sync 3
 
115
 
 
116
        # wait for s2 to become healthy
 
117
        sema r2 sync 2
100
118
        txreq -url "/foo"
101
119
        rxresp
102
120
        expect resp.http.foo == "2"
103
 
} -run
104
 
 
105
 
# setup for probe #3
106
 
 
107
 
server s1 {
108
 
        rxreq
109
 
        expect req.url == "/"
110
 
        txresp -body "slash"
111
 
} -start
112
 
 
113
 
server s2 {
114
 
        rxreq
115
 
        expect req.url == "/"
116
 
        txresp -body "slash"
117
 
} -start
118
 
 
119
 
# after probe #3 b1 should be healthy.
120
 
 
121
 
server s1 {
122
 
        rxreq
123
 
        expect req.url == "/foo"
124
 
        txresp -hdr "Foo: 1" -body "foobar"
125
 
} -start
126
 
 
127
 
client c1 {
 
121
 
 
122
        # wait for s1 to become healthy
 
123
        sema r3 sync 2
128
124
        txreq -url "/foo"
129
125
        rxresp
130
126
        expect resp.http.foo == "1"