Giter Club home page Giter Club logo

Comments (3)

drteeth avatar drteeth commented on June 13, 2024

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.

roehst avatar roehst commented on June 13, 2024

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.

drteeth avatar drteeth commented on June 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.