diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 11:06:13 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 11:06:13 +0200 |
| commit | d1edd420463cdda399d8acb8124b137cbfd7a898 (patch) | |
| tree | e7a7a94ce764793d39e63e8fac6f5013177b0e8f /tests | |
| parent | 1f21f4c90d2f99f83b5718650e5f8e487a4e1218 (diff) | |
Sample primary repeat timeout
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 17 |
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 |
