networkmanager: the watcher socket's bound is a stated constant

Builds: design 08 sign-in-page §12; lead answer C-8 (hq df22a138)
This commit is contained in:
jochen
2026-11-24 21:50:00 +01:00
parent 77602d8586
commit 42b5a7aef3
2 changed files with 11 additions and 1 deletions
@@ -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.
@@ -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)
}
}