[master] 502a871 Coverage for the cooling state

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Sat Dec 5 17:10:32 CET 2015


commit 502a871051ccf7a9037f7c5aad3977618e2355c6
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