From 42b5a7aef31e3f9442ab20cf49bd96b7539c12f9 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 24 Nov 2026 21:50:00 +0100 Subject: [PATCH] networkmanager: the watcher socket's bound is a stated constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 08 sign-in-page §12; lead answer C-8 (hq df22a138) --- modules/networkmanager/cmd/uplink-tools/state.go | 3 ++- modules/networkmanager/cmd/uplink-tools/state_test.go | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/networkmanager/cmd/uplink-tools/state.go b/modules/networkmanager/cmd/uplink-tools/state.go index b8a16c1cc..852a4a972 100644 --- a/modules/networkmanager/cmd/uplink-tools/state.go +++ b/modules/networkmanager/cmd/uplink-tools/state.go @@ -38,7 +38,8 @@ const ( askRatingAgain = "rating-again" ) -// socketBound is how long the bundle waits for the watcher's one answer on its socket. +// socketBound is how long one ask on the watcher's socket may take, a stated constant (design 08 sign-in-page §12; +// lead answer C-8): a bundle's ask past it counts as no answer, and the watcher drops a line not asked within it. const socketBound = 5 * time.Second // journal writes one line to the part's journal: its standard error, which the service manager keeps. diff --git a/modules/networkmanager/cmd/uplink-tools/state_test.go b/modules/networkmanager/cmd/uplink-tools/state_test.go index bc6ffeb99..495c8fe9c 100644 --- a/modules/networkmanager/cmd/uplink-tools/state_test.go +++ b/modules/networkmanager/cmd/uplink-tools/state_test.go @@ -6,6 +6,7 @@ import ( "path/filepath" "strings" "testing" + "time" ) func aFolder(t *testing.T) Folder { @@ -163,3 +164,11 @@ func TestAPathTheWatcherDoesNotKnowIsLeftAndSaidOnce(t *testing.T) { t.Fatal("a path the watcher does not know was not left") } } + +// The bounds the design states, each a constant and none a setting: the socket's 5 s, the open's 10 s, the session +// start's 60 s and the 256 kept events (design 08 sign-in-page §12, §17, §18, §20; R2-7, C-8). +func TestTheStatedBounds(t *testing.T) { + if socketBound != 5*time.Second || openBound != 10*time.Second || sessionWait != 60*time.Second || keptBound != 256 { + t.Fatalf("the bounds are %s, %s, %s and %d", socketBound, openBound, sessionWait, keptBound) + } +}