Assert nominal VPN pressure action

This commit is contained in:
2026-05-16 13:42:56 +03:00
parent 5e4c0d596b
commit 6a46063565
2 changed files with 11 additions and 0 deletions
@@ -797,6 +797,16 @@ func TestFabricFlowSchedulerDropsWhenChannelQueueIsFull(t *testing.T) {
}
}
func TestFabricFlowSchedulerSnapshotReportsNominalAction(t *testing.T) {
snapshot := NewFabricFlowScheduler(8, 8).Snapshot()
if snapshot.PressureLevel != "nominal" ||
snapshot.PressureScore != 0 ||
len(snapshot.PressureReasons) != 0 ||
snapshot.RecommendedAction != "observe" {
t.Fatalf("nominal pressure snapshot = %+v", snapshot)
}
}
func TestFabricFlowSchedulerRoundsSubMillisecondSendDuration(t *testing.T) {
scheduler := NewFabricFlowScheduler(8, 8)
channelID := "flow-01"
@@ -478,6 +478,7 @@ The `flow_pressure` summary includes a `recommended_action` such as
`recommended_action` is now part of the shared `FabricFlowSchedulerSnapshot`
contract, so heartbeat reports and smoke diagnostics consume the same runtime
decision.
The scheduler's nominal snapshot explicitly reports the `observe` action.
`mesh-live-smoke` reports the recommended action for its mixed bulk/interactive
load scenario.
Nodes advertise the `vpn_fabric_flow_pressure` capability when that heartbeat