test(app): pace broadcast bursts to remove a race flake

This commit is contained in:
2026-11-23 14:31:49 +00:00
parent fe2d9f8b3a
commit 4d31e535ff
2 changed files with 19 additions and 6 deletions
+5
View File
@@ -251,6 +251,11 @@ func (s *Server) Dropped() uint64 {
return s.dropped.Load()
}
// Pending returns how many events wait in the broadcast channel.
func (s *Server) Pending() int {
return len(s.broadcast)
}
// BroadcastEvent satisfies the events.Broadcaster contract used by
// cache/scanner sub-systems. It accepts a string event type and an
// arbitrary payload (typically map[string]any) and forwards to the