Keep connected cost fixtures compiling and reject missing live frames

Remove an unused test import exposed by source-fciz7jhb and require the quiet-aware cost probe to retain all clients and actually queue changed readings.

Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-10-06 12:14:07 +01:00
parent cb61f75419
commit ccce221fe7
3 changed files with 6 additions and 2 deletions
@@ -50,6 +50,9 @@ func NewQuietBroadcastProjectionProbeForTest(getState func(string) interface{},
hub.dispatchStateBroadcast(&Message{Type: "rawData", Data: stateBroadcastRequest{}}, "")
bytes := 0
for _, client := range clients {
if !hub.clients[client] {
return 0, fmt.Errorf("cost probe lost a client")
}
select {
case data := <-client.send:
bytes += len(data)
@@ -85,6 +85,9 @@ func BenchmarkConnectedDashboardCost(b *testing.B) {
if err != nil {
b.Fatal(err)
}
if viewers > 0 && mode != "quiet" && mode != "cold" && wire == 0 {
b.Fatal("live workload queued no frame")
}
}
b.ReportMetric(float64(wire), "wire-B/op")
})
@@ -4,8 +4,6 @@ import (
"bytes"
"encoding/json"
"testing"
"github.com/rcourtman/pulse-go-rewrite/internal/models"
)
func TestStateDeltaDispatchSharesOnlyAcceptedBaseline(t *testing.T) {