Add runtime reproduction test for event adapter regression in v1.5.51.1#554
Merged
Aaronontheweb merged 6 commits intoOct 14, 2025
Merged
Conversation
8d4ebdf to
8603699
Compare
…rations This test reproduces the scenario from issue akkadotnet#552 where: 1. WithSqlPersistence is called with event adapters (for tagging) 2. WithSqlPersistence is called again with separate journal/snapshot options (for sharding) The test uses Akka.Hosting.TestKit for cleaner lifecycle management and follows the same pattern as other end-to-end tests in the project. Test verifies: - Creates a persistent actor - Persists events that should be tagged by the event adapter - Queries by tag using EventsByTag - Asserts that all 3 events are found with the correct tag On v1.5.51: TEST PASSES ✓ Event adapters work correctly even with multiple WithSqlPersistence calls. Next step: Test on v1.5.51.1 to see if regression exists.
8603699 to
eb68d0f
Compare
This upgrade includes the fix from Akka.Hosting PR #669 which removes dual registration of event adapters. The HOCON configuration now correctly includes event adapters, though the runtime test still requires investigation.
This test reproduces the event adapter regression reported in issue akkadotnet#552 where event tagging stopped working after updating from v1.5.51 to v1.5.51.1. The test uses the NEW callback API pattern (journalBuilder parameter) which matches the user's actual code from their reproduction. This demonstrates that the NEW callback API for event adapters has been broken since v1.5.51.1 when followed by WithJournalAndSnapshot(). Test results: - EventAdapter_ShouldWork_OnDefaultJournal: FAILS (adapter called 0 times) - EventAdapter_ShouldWork_OnShardingJournal_ReproducesUserScenario: FAILS (adapter called 0 times) The test configuration mimics the user's scenario: 1. WithSqlPersistence() with journalBuilder callback to add event adapters 2. WithJournalAndSnapshot() for sharding configuration While adapters appear in HOCON configuration, they are never invoked at runtime. Related to akkadotnet#552
…om/Aaronontheweb/Akka.Persistence.Sql into feature/runtime-event-adapter-test # Conflicts: # src/Directory.Packages.props
This was referenced Oct 15, 2025
This was referenced Oct 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a runtime test that reproduces the event adapter regression reported in issue #552.
Problem
Event adapters configured via
WithSqlPersistence()stop working in v1.5.51.1 when the method is called multiple times (e.g., once for default persistence with adapters, then again for sharding configuration).Test Results
Root Cause
The issue is in Akka.Hosting's dual registration pattern (adapters serialize via both
ToConfig()AND callback'sBuild()). This is being fixed in akkadotnet/Akka.Hosting#669.Test Details
RuntimeEventAdapterSpec.csmimics the user's exact scenario:WithSqlPersistence()withjournalBuilderthat adds event adapters for taggingWithSqlPersistence()with separate journal/snapshot options for sharding (isDefaultPlugin: false)Related