Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for large cell logging in Azure Sink #163

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

daveapsgithub
Copy link

The Azure Table Sink silently fails when attempting to add more than 64K of data (32K string) to a cell. All subsequent logging also stops working even if this limit is not exceeded.

Added two new test methods to the AzureTableStorageWithPropertiesSinkTests The first test, WhenALoggerWritesToTheSinkAndACellExceeds32KAnExceptionIsRaised, verifies that an exception is thrown when a log entry exceeds the 32K character limit, noting the test is skipped for the Storage Emulator due to its different limit constraints. The second test, WhenALoggerWritesToTheSinkAndACellExceeds32KAnExceptionIsRaisedButSubsequentCallsContinueToWorkAsExpected, checks that after an oversized entry throws an exception, subsequent log entries are processed normally.

Added two new test methods to the `AzureTableStorageWithPropertiesSinkTests` class to address scenarios involving logging entries that exceed Azure Table Storage's cell size limit using Serilog. The first test, `WhenALoggerWritesToTheSinkAndACellExceeds32KAnExceptionIsRaised`, verifies that an exception is thrown when a log entry exceeds the 32K character limit, noting the test is skipped for the Storage Emulator due to its different limit constraints. The second test, `WhenALoggerWritesToTheSinkAndACellExceeds32KAnExceptionIsRaisedButSubsequentCallsContinueToWorkAsExpected`, checks that after an oversized entry throws an exception, subsequent log entries are processed normally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant