From 5aca005cb741306fbe2caece689c3330fa124e02 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 19 Oct 2026 12:15:47 +0200 Subject: [PATCH] Shorten the router's burst window in the test bundle so the desk is sent within seconds (issue 1218, check finding 1) --- modules/messenger/cmd/messenger/bus_test.go | 1 + modules/messenger/cmd/messenger/holder.go | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/messenger/cmd/messenger/bus_test.go b/modules/messenger/cmd/messenger/bus_test.go index dc6ada66..6e34d5eb 100644 --- a/modules/messenger/cmd/messenger/bus_test.go +++ b/modules/messenger/cmd/messenger/bus_test.go @@ -35,6 +35,7 @@ func TestMain(m *testing.M) { if os.Getenv(bundleVar) == "1" { kindsEvery = 200 * time.Millisecond StartGrace = 500 * time.Millisecond + BurstWindow = 200 * time.Millisecond main() os.Exit(0) } diff --git a/modules/messenger/cmd/messenger/holder.go b/modules/messenger/cmd/messenger/holder.go index 9afc0e30..79cbb1b8 100644 --- a/modules/messenger/cmd/messenger/holder.go +++ b/modules/messenger/cmd/messenger/holder.go @@ -55,6 +55,10 @@ import ( "time" ) +// BurstWindow: what arrives for a channel within it goes out as one message. A variable, so the test bundle +// shortens it. +var BurstWindow = 30 * time.Second + // StartGrace: after start, nothing but the urgent conditions open in the controller's state. A variable, as // kindsEvery is, so the test bundle shortens it. var StartGrace = time.Minute @@ -75,8 +79,6 @@ const ( // FreshFor: an event older than this by its own time is history — state, never a message. FreshFor = 10 * time.Minute - // BurstWindow: what arrives for a channel within it goes out as one message. - BurstWindow = 30 * time.Second // DesktopWarningEvery: warnings reach the desktop at most this often. DesktopWarningEvery = 15 * time.Minute // ResyncEvery: how often the open set is read from the controller again.