sqlinsight-pro/tests
Søren Eggert Lundsteen Olsen 25a67cb98b Stop SQLInsight deadlocking itself, and stop reporting its own deadlocks
At a customer whose repository sits on a monitored instance, the agent
reported 12 deadlocks that were its own: two instances' monitors save
findings in parallel, one transaction each, and while insight.Findings is
small SQL Server scans it, so the two lock each other's rows.

- SaveRuleResultsAsync takes an exclusive application lock for its
  transaction (the agent is the only writer; a save takes milliseconds)
  and retries if chosen as deadlock victim anyway
- repository connections are named "SQLInsight Pro (repository)"
- deadlocks where every participant is SQLInsight Pro are not reported
  (the read position still moves past them); any other session keeps it

The new integration test (two instances saving 25 rules x 40 rounds in
parallel) failed 2 of 2 without the fix and passed 5 of 5 with it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 07:34:59 +02:00
..
SQLInsight.Agent.Tests Rules the version does not support are "not applicable", not "not measurable" 2026-10-01 16:05:39 +02:00
SQLInsight.Collectors.Tests Stop SQLInsight deadlocking itself, and stop reporting its own deadlocks 2026-10-02 07:34:59 +02:00
SQLInsight.Community.Tests Keep severity badge cells as table cells on both overviews 2026-10-01 15:39:36 +02:00
SQLInsight.Connectivity.Tests Fase 2: Azure SQL Managed Instance, docs and rule catalog test 2026-09-29 08:23:40 +00:00
SQLInsight.Core.Tests Top SQL: collect what the heaviest statements use every 5 minutes 2026-10-01 15:46:45 +02:00
SQLInsight.IntegrationTests Stop SQLInsight deadlocking itself, and stop reporting its own deadlocks 2026-10-02 07:34:59 +02:00
SQLInsight.Licensing.Tests Ship SEOSoft's license key k20261001; agent defaults to the real hub 2026-10-01 07:15:47 +02:00
SQLInsight.Notifications.Tests Fase 4: integration with Prometheus, Grafana, SCOM and scripts 2026-09-29 09:56:01 +00:00
SQLInsight.Rules.Tests Rules the version does not support are "not applicable", not "not measurable" 2026-10-01 16:05:39 +02:00
SQLInsight.Updates.Tests Community-websted og Discourse-forum 2026-09-29 13:45:06 +00:00