Ecto Sandbox, Projections and In Memory adapter

Aperta
#553 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
elixir, postgresql

Direzione di ricerca

Inizia con la guida «Testing your application» e con il codice sorgente del gestore in memoria menzionato nel report. Riproduci, usando l’adattatore in memoria, un comando fortemente coerente seguito da una lettura della proiezione, quindi determina se gli aggiornamenti della proiezione vengono recapitati; il lavoro è completato quando il passaggio di test mancante o il comportamento dell’adattatore è chiaramente identificato e coperto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi all,

We are trying to read projections during test.

We have just created our first projector, but we are having trouble reading projections during the test.

In production we use Postgres as event store, and in test we use the in memory adapter.

The testing guide (https://github.com/commanded/commanded/wiki/Testing-your-application) in the Wiki provides instructions for how to keep projections up-to-date running tests, involving issuing a TRUNCATE command to event store.

Our main pattern to run commands is to dispatch a command with strong consistency, and then read it back from the projection before returning.

With the projection, it returns nil (i.e., it doesn't find the rows in the projections).

So I assume there might be some step akin to truncating tables in the Postgres adapter.

I tried reading the source code for the in memory manager, and I can see it dispatches events for subscribers. I am assuming this can have something to do as well.

So, am I missing a step here? If my writing is not sufficiently clear, don't feel afraid to ask for more clarity. Thanks in advance!

Lingua principale
Elixir
Stelle
2k
Fork
256
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di commanded/commanded

Tutte le issue di commanded/commanded

Issue simili

Altre issue su Elixir

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.