[5.1] 9f42262 backend polling: Test responses without reason, check the outcome

Nils Goroll nils.goroll at uplex.de
Mon Apr 10 13:59:08 CEST 2017


commit 9f4226200ef7784b597056fbb788b57f64ca6ef3
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Apr 4 16:09:59 2017 +0200

    backend polling: Test responses without reason, check the outcome
    
    We expect:
    
    - two initial healthy probes (threshold - 1 = 2 by default)
    - eight healthy probes (explicitly checked)
    - five failing probes
    - two healthy probes
    
    To tolerate up to 500ms before cliexpect runs after the barrier was
    raised, we accept up to five additional failed probes.

diff --git a/bin/varnishtest/tests/c00017.vtc b/bin/varnishtest/tests/c00017.vtc
index b062980..42960d0 100644
--- a/bin/varnishtest/tests/c00017.vtc
+++ b/bin/varnishtest/tests/c00017.vtc
@@ -23,6 +23,12 @@ server s1 {
 		txresp -proto "FROBOZ" -status 200 -hdr "Bar: foo" -body "foobar"
 		accept
 	}
+	loop 2 {
+		rxreq
+		expect req.url == "/"
+		send "HTTP/1.1 200 \r\n"
+		accept
+	}
 
 	barrier b1 sync
 } -start
@@ -42,4 +48,4 @@ varnish v1 -vcl {
 
 barrier b1 sync
 
-varnish v1 -cli "backend.list -p"
+varnish v1 -cliexpect "^CLI RX|  -+H{10}-{5}H{2}-{0,5} Happy" "backend.list -p"



More information about the varnish-commit mailing list