Skip to content

Commit

Permalink
stabilize test
Browse files Browse the repository at this point in the history
have seen this failing on Travis with:

**** v1   vsl|       1004 VCL_call        b BACKEND_FETCH
**** v1   vsl|       1004 VCL_return      b abandon
**** v1   vsl|       1004 BereqAcct       b 0 0 0 0 0 0

Tested ok locally with varnishtest -n 1000 -j 60.
  • Loading branch information
nigoroll committed Mar 13, 2020
1 parent 31d22d4 commit 0ec0747
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bin/varnishtest/tests/d00036.vtc
@@ -1,6 +1,6 @@
varnishtest "Test dynamic UDS backend hot swap after it was picked by a bereq"

barrier b1 cond 2
barrier b1 sock 2

server s1 -listen "${tmpdir}/s1.sock" {
} -start
Expand Down Expand Up @@ -30,8 +30,8 @@ varnish v1 -vcl {

sub vcl_backend_fetch {
set bereq.backend = s1.backend();
# hot swap should happen while we sleep
vtc.sleep(2s);
# hot swap has happened
vtc.barrier_sync("${b1_sock}");
if (std.healthy(bereq.backend)) {
return(abandon);
} else {
Expand All @@ -44,17 +44,16 @@ varnish v1 -expect MAIN.n_backend == 1

client c1 {
txreq
barrier b1 sync
rxresp
expect resp.status == 200
}

client c2 {
barrier b1 sync
delay 0.1
txreq -req "SWAP" -hdr "X-Path: ${s2_sock}"
rxresp
expect resp.status == 200
barrier b1 sync
}

client c1 -start
Expand Down

0 comments on commit 0ec0747

Please sign in to comment.