Commit 37d039e9 authored by Geoff Simmons's avatar Geoff Simmons

Verify that calling .create_stats() on an empty set is not an error.

Even if it is pointless. All stats values are 0 in that case.
parent 3705ca88
......@@ -43,6 +43,11 @@ varnish v1 -vcl {
n.add("bar");
n.add("baz");
n.add("quux");
# Calling .create_stats() on an empty set is
# pointless, but not an error.
new e = selector.set();
e.create_stats();
}
}
......@@ -56,6 +61,13 @@ varnish v1 -expect SELECTOR.vcl2.p.dmin > 0
varnish v1 -expect SELECTOR.vcl2.p.dmax > 0
varnish v1 -expect SELECTOR.vcl2.p.davg > 0
varnish v1 -expect SELECTOR.vcl2.e.elements == 0
varnish v1 -expect SELECTOR.vcl2.e.nodes == 0
varnish v1 -expect SELECTOR.vcl2.e.leaves == 0
varnish v1 -expect SELECTOR.vcl2.e.dmin == 0
varnish v1 -expect SELECTOR.vcl2.e.dmax == 0
varnish v1 -expect SELECTOR.vcl2.e.davg == 0
# When vcl1 is set to cold, stats for vcl2.p but not vcl1.s appear.
varnish v1 -cliok "vcl.state vcl1 cold"
varnish v1 -vsc SELECTOR.*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment