Promote VPN pressure action to snapshot
This commit is contained in:
@@ -792,6 +792,9 @@ func TestFabricFlowSchedulerDropsWhenChannelQueueIsFull(t *testing.T) {
|
||||
if snapshot.PressureLevel != "critical" || snapshot.PressureScore <= 0 || !containsString(snapshot.PressureReasons, "drops") {
|
||||
t.Fatalf("pressure = %s score=%d reasons=%v, want critical drops", snapshot.PressureLevel, snapshot.PressureScore, snapshot.PressureReasons)
|
||||
}
|
||||
if snapshot.RecommendedAction != "shed_or_reroute" {
|
||||
t.Fatalf("recommended action = %q, want shed_or_reroute", snapshot.RecommendedAction)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFabricFlowSchedulerRoundsSubMillisecondSendDuration(t *testing.T) {
|
||||
@@ -1553,6 +1556,9 @@ func TestFabricClientPacketIngressIsolatesRouteFailoverPerLogicalChannel(t *test
|
||||
!containsString(snapshot.FlowScheduler.PressureReasons, "route_failures") {
|
||||
t.Fatalf("route recovery pressure = %s score=%d reasons=%v", snapshot.FlowScheduler.PressureLevel, snapshot.FlowScheduler.PressureScore, snapshot.FlowScheduler.PressureReasons)
|
||||
}
|
||||
if snapshot.FlowScheduler.RecommendedAction != "rebuild_or_reroute" {
|
||||
t.Fatalf("route recovery action = %q, want rebuild_or_reroute", snapshot.FlowScheduler.RecommendedAction)
|
||||
}
|
||||
if statB.LastRouteID != "route-primary" || statB.LastFailedRouteID != "" || statB.ConsecutiveFailures != 0 {
|
||||
t.Fatalf("channel B stat = %+v, want primary route memory preserved", statB)
|
||||
}
|
||||
@@ -1923,6 +1929,9 @@ func TestFabricFlowSchedulerProtectsInteractiveWindowDuringBulkPressure(t *testi
|
||||
if snapshot.PressureLevel != "warning" || snapshot.PressureScore <= 0 || !containsString(snapshot.PressureReasons, "bulk_pressure") {
|
||||
t.Fatalf("pressure = %s score=%d reasons=%v, want warning bulk pressure", snapshot.PressureLevel, snapshot.PressureScore, snapshot.PressureReasons)
|
||||
}
|
||||
if snapshot.RecommendedAction != "throttle_bulk" {
|
||||
t.Fatalf("recommended action = %q, want throttle_bulk", snapshot.RecommendedAction)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFabricFlowSchedulerRollingQualityWindowForgetsOldPressure(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user