- Test SaveEvent persists events correctly (single, multiple, multi-actor)
- Test GetEvents retrieves events in insertion order
- Test GetEvents with fromVersion filtering
- Test GetLatestVersion returns correct version
- Test behavior with non-existent actor IDs (returns empty/zero)
- Test concurrent access safety with race detector
- Add mutex protection to InMemoryEventStore for thread safety
Closes#3
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Excellent PR with comprehensive test coverage and proper thread safety implementation.
Highlights
30+ well-structured tests covering all EventStore methods
Good use of sync.RWMutex for concurrent access safety
Thorough edge case testing (MaxInt64, empty store, special actor IDs)
Includes benchmarks for performance tracking
Race detector verified with 100 goroutines
Note
PR #31 (SnapshotStore tests) will need to rebase onto this and add the same mutex protection to SaveSnapshot/GetLatestSnapshot methods.
LGTM - ready to merge.
## Code Review - Approved
Excellent PR with comprehensive test coverage and proper thread safety implementation.
### Highlights
- 30+ well-structured tests covering all EventStore methods
- Good use of `sync.RWMutex` for concurrent access safety
- Thorough edge case testing (MaxInt64, empty store, special actor IDs)
- Includes benchmarks for performance tracking
- Race detector verified with 100 goroutines
### Note
PR #31 (SnapshotStore tests) will need to rebase onto this and add the same mutex protection to `SaveSnapshot`/`GetLatestSnapshot` methods.
LGTM - ready to merge.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Changes
store/memory_test.gowith 30+ test cases covering all acceptance criteriasync.RWMutexto InMemoryEventStore for concurrent access safetyTest Coverage
Closes #3
Code Review - Approved
Excellent PR with comprehensive test coverage and proper thread safety implementation.
Highlights
sync.RWMutexfor concurrent access safetyNote
PR #31 (SnapshotStore tests) will need to rebase onto this and add the same mutex protection to
SaveSnapshot/GetLatestSnapshotmethods.LGTM - ready to merge.