Open patriknw opened 5 months ago
A workaround was added for JournalSpec in https://github.com/lightbend/akka-persistence-dynamodb-private/pull/5, but it doesn't cover all writes/reads. We need something for all tests.
Do we expect people to create their own integration tests against local DynamoDB? If we want to support that, then it probably needs to be a mode built into the journal implementation. Otherwise I guess we could make the shared journal specs flexible enough to allow inserting the consistency check.
Good point. Any test with an event sourced entity could behave weird if it doesn't see it's own events when restarting. Less likely to happen in full integration test with actor restart in between, but then we are also in the "most of the time" territory. Sounds necessary to include a mode with read-after-write check in the journal implementation.
Looks like reads are always eventually consistent for local DynamoDB:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.UsageNotes.html#DynamoDBLocal.Differences