akka-projection
akka-projection copied to clipboard
Supported projection implementation handler types should be added to TestProjection
Short description
The TestProjection
currently only supports simple Handler.process
types which have a Envelope => Future[Done]
signature. Support for Slick and JDBC handler types should be added.
I think we need customer request for this before expanding the Slick support. Main reason for Slick support was to support migration for Lagom users, and TestProjection is probably not essential for that.
Hi! Has anything regarding this topic changed? Or you still don't see enough demand for this to be implemented?
@DcortezMeleth, it seems that there is not much interest in that feature.
On top of that, I see another issue with Slick. The handler has the shape Envelope => DBIO[Done]
. That means that we will need to have an in-memory interpreted for DBIO
to transform it to Future
. Not impossible, it's just a non-trivial task.
That said, I think the easiest way to test it is to use a test database (like h2) and wrap the Slick handler you want to test with a Envelope => Future[Done]
handler. The wrapper handler would then run the DBIO
against the h2 db.