Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Keep the repeated-stream deadline distinct from a speed assertion

pulse-triage[bot]bf87e439fc7f
diff --git a/internal/api/agent_events_auth_test.go b/internal/api/agent_events_auth_test.go
index 9e3fd409c9..8ed7ce0aa0 100644
--- a/internal/api/agent_events_auth_test.go
+++ b/internal/api/agent_events_auth_test.go
@@ -137,7 +137,10 @@ func TestAgentEventTokenRefreshKeepsBoundedContext(t *testing.T) {
token := newTokenRecord(t, agentEventLifecycleToken, []string{config.ScopeMonitoringRead, config.ScopeAIExecute}, nil)
token.OrgID = orgID
cfg := newTestConfigWithTokens(t, token)
- ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
+ // The deadline is a preserved request value, not a throughput budget.
+ // Explicit cancellation after the fixed frame count owns termination;
+ // the enclosing go test timeout still bounds a hung handler.
+ ctx, cancel := context.WithTimeout(context.Background(), time.Hour)
defer cancel()
type requestMarker struct{}
ctx = context.WithValue(ctx, requestMarker{}, "admitted-value")