elsa-core/test/unit/Elsa.Diagnostics.StructuredLogs.Persistence.Relational.UnitTests
Sipke Schoorstra 55e3e4091d
fix(diagnostics): honor MaxRecentLogQuerySize for relational Take (#8147)
* fix(diagnostics): honor MaxRecentLogQuerySize for relational Take

Relational recent-log queries used a hard-coded null→100 default and
1000 clamp, so enabling Sqlite silently dropped the page size from the
InMemory contract of StructuredLogsOptions.MaxRecentLogQuerySize.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* test(diagnostics): disambiguate Options.Create in SQL builder tests

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(diagnostics): normalize negative MaxRecentLogQuerySize before Clamp

Math.Clamp throws when the configured ceiling is negative. Both
InMemory and Relational now share ClampRecentLogQueryTake, which treats
a negative max as zero so query construction cannot fail.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-14 08:07:17 +02:00
..
Elsa.Diagnostics.StructuredLogs.Persistence.Relational.UnitTests.csproj [codex] Add structured log SQLite persistence (#7445) 2026-05-13 15:57:06 +02:00
RelationalStructuredLogMapperTests.cs [codex] Increase structured log relational test coverage (#7451) 2026-05-16 11:05:52 +02:00
RelationalStructuredLogServiceCollectionExtensionsTests.cs Fix structured log diagnostics registration 2026-05-17 08:42:23 +02:00
RelationalStructuredLogSqlBuilderTests.cs fix(diagnostics): honor MaxRecentLogQuerySize for relational Take (#8147) 2026-09-14 08:07:17 +02:00
StructuredLogMigrationTests.cs [codex] Add structured log SQLite persistence (#7445) 2026-05-13 15:57:06 +02:00