Skip to content

89 databaseoperations should handle connection failures gracefull #92

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

Merged

Conversation

leonibr
Copy link
Owner

@leonibr leonibr commented Jul 21, 2025

No description provided.

leonibr added 4 commits July 20, 2025 22:15
…d error handling

- Introduced resilience policies for database operations, including retry and circuit breaker mechanisms.
- Added IPolicyFactory interface and PolicyFactory class to encapsulate policy creation.
- Enhanced PostgreSqlCacheOptions with configuration options for resilience patterns.
- Refactored existing database operation methods to utilize new resilience execution methods.
- Validated resilience configuration options to ensure proper setup.
…stency

- Changed target framework in CachingTest.csproj from net6.0 to net8.0.
- Refactored test methods in DatabaseExpiredItemsRemoverLoopTests and DatabaseOperationsAdditionalTests to use synchronous methods instead of asynchronous ones for better clarity and consistency.
- Updated comments in tests to reflect resilience behavior when using invalid connection strings.
- Added new tests for resilience patterns in DatabaseOperationsResilienceTests and DatabaseResilienceIntegrationTests.
- Introduced new tests for policy creation in PolicyFactoryTests and validated PostgreSqlCacheOptions for resilience configurations.
- Updated DatabaseOperationsAdditionalTests to focus on unique scenarios.
- Renamed test method for constructor verification to better reflect its purpose.
- Removed outdated tests related to cache item operations that were deemed unnecessary.
- Added new tests for cache item expiration scenarios in DatabaseOperationsTests to ensure comprehensive coverage.
… handling

- Updated DatabaseOperations to remove redundant exception handling when resilience patterns are disabled, allowing direct execution of operations.
- Refactored PolicyFactory to enhance logging behavior based on resilience options and adjusted the order of policy wrapping to conditionally include circuit breaker functionality.
- Added validation in PostgreSqlCacheOptions to log warnings when resilience sub-options are configured without enabling resilience patterns.
@leonibr leonibr closed this Jul 21, 2025
@leonibr leonibr reopened this Jul 21, 2025
@leonibr leonibr marked this pull request as ready for review July 21, 2025 13:18
@leonibr leonibr merged commit d3ff754 into next Jul 21, 2025
3 checks passed
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