Comments (3)
If you have your Repo setup using Sandbox mode in tests, which work by starting a transaction at the beginning of a test and the rolling it back at the end, then the test's connection and the projector's connection cannot see each other's un-commited writes.
You would either need to allow the projector process access to the test's sandbox (https://hexdocs.pm/ecto_sql/Ecto.Adapters.SQL.Sandbox.html), or stop using the sandbox altogether and truncate tables as in the wiki.
from commanded.
Hey @drteeth (cool name btw), your explanation makes sense, and thanks for it.
We tried the allow configuration as per Ecto's documentation, and we are uncertain as to proceed.
We tried that, but we were still getting no projections from the projector after we run the command (with strong consistency).
What we did was, in the test file, set the mode to shared, with the current process as pid and the pid of the projector as allow. We found the projectors pid via which_children on its supervisor.
Maybe we should start the projector manually at the beginning of the test? Do you have more ideas we can try?
from commanded.
Yes starting the projector at the start of your test makes sense. use:
pid = start_supervised!(YourProjector)
so that it is properly cleaned up by the test
from commanded.
Related Issues (20)
- Process manager router option not working
- Lessons learned from performance optimization - an unlikely culprit HOT 3
- no function clause matching in Commanded.Commands.Dispatcher.telemetry_stop/3 HOT 1
- Docs questions
- Stacktrace in event handler error? HOT 2
- Paralelization Strategies in EventHandlers
- Should Commanded.Event.Handler support messages from swarm? HOT 2
- Event retention policies?
- please support multiple commanded application with one eventstore HOT 6
- Process Manager state serialization breaks when using a custom TypeProvider with the JsonSerializer
- `Commanded.ProcessManagers.ProcessManager.identity/0` function returns `nil` in unit tests
- no function clause matching in Commanded.Event.Handler.partition_event/4 HOT 1
- EventstoreDB is sunsetting the TCP protocol HOT 1
- Is it a bad practice for an event handler to depend on a projector completion? HOT 2
- Snapshotting 2 Aggregates having same identity
- Is it possible to log contents of InMemoryEventStore on failed test?
- Aggregate throws error when execute returns more than 1000 events.
- Individual stream events handling
- Skipped event with concurrency enabled HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commanded.