Tags: akkadotnet/Akka.Persistence.MongoDB
Tags
Update WithConnectivityCheck to use simplified Akka.Hosting 1.5.55.1 … …API (#426) * Update WithConnectivityCheck to use simplified Akka.Hosting 1.5.55.1 API This update eliminates redundant parameter passing by automatically accessing options from builder.Options, making the API cleaner and less error-prone. New simplified API: - journal.WithConnectivityCheck() - no parameters needed - Options automatically accessed from builder.Options Previous API remains functional but marked as [Obsolete] for backward compatibility. Changes: - Update MongoDbConnectivityCheckExtensions.cs with simplified API pattern - Add IEnumerable<string> support for customizable tags parameter - Mark legacy API overloads as [Obsolete] - Upgrade Akka.Hosting from 1.5.55 to 1.5.55.1 - Update RELEASE_NOTES.md with v1.5.55.1 entry * Add integration tests for simplified WithConnectivityCheck API Tests validate the new Akka.Hosting 1.5.55.1 simplified API that automatically accesses options from builder.Options. Test coverage includes: - Journal connectivity check registration - Snapshot store connectivity check registration - Custom health status configuration - Custom name configuration - Custom tags configuration - Validation that missing connection strings throw appropriate exceptions The simplified API automatically detects whether MongoDbSnapshotOptions or MongoDbGridFsSnapshotOptions is being used, providing seamless support for both standard and GridFS snapshot stores without requiring different methods. These tests complement the existing unit tests for connectivity check classes by validating the extension method integration points. * Rewrite SimplifiedConnectivityCheckApiSpec tests to use proper Akka.Hosting test infrastructure Fixed failing tests by switching from manual ServiceCollection instantiation to inheriting from Akka.Hosting.TestKit.TestKit. Tests now properly use the Akka.Hosting infrastructure to register health checks and validate them using the public HealthCheckService API instead of reflection. Changes: - Inherit from Akka.Hosting.TestKit.TestKit base class - Use DatabaseFixture for MongoDB connection strings - Override ConfigureServices() and ConfigureAkka() methods - Changed test methods from void to async Task - Use await healthCheckService.CheckHealthAsync() to get health report - Validate health checks via healthReport.Entries collection instead of reflection - Added CustomConnectivityCheckConfigSpec test class to validate custom configuration options
PreviousNext