[4.1] 35716c7 Add testcase for this ticket, the error was fixed in the previous commit.

Poul-Henning Kamp phk at FreeBSD.org
Fri Sep 4 15:54:49 CEST 2015


commit 35716c713ca505a135101e40f32670ca5671bfd1
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Jul 7 22:49:22 2015 +0000

    Add testcase for this ticket, the error was fixed in the
    previous commit.
    
    Fixes: #1755

diff --git a/bin/varnishtest/tests/r01755.vtc b/bin/varnishtest/tests/r01755.vtc
new file mode 100644
index 0000000..87828a4
--- /dev/null
+++ b/bin/varnishtest/tests/r01755.vtc
@@ -0,0 +1,29 @@
+varnishtest "The (struct backend).n_conn counter is never decremented"
+
+server s1 {
+	rxreq
+	txresp
+
+	rxreq
+	txresp
+} -start
+
+varnish v1 -vcl {
+	backend s1 {
+		.host = "${s1_addr}";
+		.port = "${s1_port}";
+		.max_connections = 1;
+	}
+} -start
+
+client c1 {
+	txreq -url "/foo"
+	rxresp
+	expect resp.status == 200
+
+	txreq -url "/bar"
+	rxresp
+	expect resp.status == 200
+} -run
+
+varnish v1 -expect backend_busy == 0



More information about the varnish-commit mailing list