fix(monitor): hold conflicting terminal coordinates

This commit is contained in:
lingniu
2026-07-16 11:16:22 +08:00
parent b9fcf476ec
commit 8487783564
4 changed files with 22 additions and 8 deletions

View File

@@ -317,7 +317,7 @@ func TestJT808LocationArbitrationGuardsJumpsAndSourceFlapping(t *testing.T) {
t.Fatalf("JT808 source guard missing %q: %s", want, upsertJT808RealtimeLocationSourceSQL)
}
}
for _, want := range []string{"vehicle_location_source_policy", "cur.source_key = s.source_key", "consecutive_good_samples < 3", "INTERVAL 2 MINUTE", "> 200"} {
for _, want := range []string{"vehicle_location_source_policy", "cur.source_key = s.source_key", "consecutive_good_samples < 3", "INTERVAL 2 MINUTE", "> 200", "THEN -10000", "updated_at = VALUES(updated_at)"} {
if !strings.Contains(electJT808RealtimeLocationSQL, want) {
t.Fatalf("JT808 canonical election missing %q: %s", want, electJT808RealtimeLocationSQL)
}