[4.1] e0b97cf Coverage for the cooling state

Lasse Karstensen lkarsten at varnish-software.com
Thu Jan 14 15:15:08 CET 2016


commit e0b97cf0c2cbda05c828aa76807135d12c108f39
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Sat Dec 5 16:17:02 2015 +0100

    Coverage for the cooling state

diff --git a/bin/varnishtest/tests/v00045.vtc b/bin/varnishtest/tests/v00045.vtc
new file mode 100644
index 0000000..b1754ee
--- /dev/null
+++ b/bin/varnishtest/tests/v00045.vtc
@@ -0,0 +1,29 @@
+varnishtest "Hold a reference to a VCL after a COLD event"
+
+server s1 -start
+
+# Load and use a new VCL that will hold a reference
+varnish v1 -vcl+backend {
+	import ${vmod_debug};
+	sub vcl_init {
+		debug.vcl_release_delay(2s);
+	}
+} -start
+
+# Load and use a new VCL, freeze the first
+varnish v1 -vcl+backend {}
+varnish v1 -cliok "vcl.state vcl1 cold"
+
+# We should now see it as cooling
+delay 1
+shell {
+	${varnishadm} -n ${v1_name} vcl.list |
+	grep "auto/cooling.*vcl1" >/dev/null
+}
+
+# It will eventually cool down
+delay 2
+shell {
+	${varnishadm} -n ${v1_name} vcl.list |
+	grep "auto/cold.*vcl1" >/dev/null
+}



More information about the varnish-commit mailing list