fix(historian): T9 review round 1 - dup-key retry counter, alarm Classify retries unknown, test hardening

Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
Joseph Doherty
2026-10-09 13:30:42 -04:00
parent bef47f89da
commit c2ab68ceb5
5 changed files with 71 additions and 39 deletions
@@ -44,4 +44,12 @@ public sealed class AlarmEventIdTests
})
SqlServerAlarmHistorianWriter.ComputeEventId(other).ShouldNotBe(basis);
}
[Theory]
[InlineData(typeof(InvalidOperationException))]
[InlineData(typeof(ArgumentException))]
[InlineData(typeof(FormatException))]
public void Non_SQL_exceptions_retry_rather_than_dead_letter(Type type) =>
SqlServerAlarmHistorianWriter.Classify((Exception)Activator.CreateInstance(type)!)
.ShouldBe(HistorianWriteOutcome.RetryPlease);
}