summaryrefslogtreecommitdiff
path: root/tests/run.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run.lua')
-rw-r--r--tests/run.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index b010908..a2bf7e1 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -3843,6 +3843,23 @@ test("Primary eligibility repeats at a matching numeric landing", function()
)
end)
+test("Repeated primary timeout is sampled from live policy", function()
+ fresh_sequence_state()
+ local host = MemoryHost.new({
+ configuration = { repeat_timeout_ms = 75 },
+ })
+ local resolver = repeat_resolver.new({
+ policy = policy.new(host),
+ })
+
+ same(75, resolver:sample_repeat_timeout_ms())
+ host:set_configuration("repeat_timeout_ms", 125)
+ same(125, resolver:sample_repeat_timeout_ms())
+ fails(function()
+ repeat_resolver.new():sample_repeat_timeout_ms()
+ end, "requires a policy")
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then