Lagom: TestKit support for JDBC

Created on 29 Nov 2016  路  7Comments  路  Source: lagom/lagom

With Lagom 1.2, you can enable support for Cassandra in TestServer, or you can disable persistence entirely (which is the default) but there's no support for testing persistence with JDBC.

persistence-api testkit feature

Most helpful comment

I have a fix for this and will submit a PR soon.

All 7 comments

Any news about this?

Now that 1.3.x is out, this issue needs clarification as it only applies to javadsl.

Hi @ignasi35 , why do you say that "this issue needs clarification as it only applies to javadsl" ??

This issue refers to running an integration tests using akka-persistence over an RDBMS database.

This issue originally required supporting JDBC for testing but implicitly meant RBDMS. The current lagom offer spans 3 different read-sides for RDBMS:

  • javadsl - jdbc
  • javadsl - jpa
  • scaladsl - slick

which could make the testing a bit more difficult since the modules to start could differ.

My previous message was confusing:

this issue needs clarification as it only applies to javadsl.

Hope this is more clear now.

(edited)

My understanding of this issue is that it's more about integration testing writes from a service implementation. There's currently no facility to do so using JDBC.

Worst than that, for now we're forced to boot a Cassandra instance in service tests:

 ServiceTest.startServer(ServiceTest.defaultSetup.withCassandra(true)) { ctx =>
  new CarApplication(ctx) with LocalServiceLocator
}

I have a fix for this and will submit a PR soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

domkun picture domkun  路  8Comments

jroper picture jroper  路  3Comments

TimMoore picture TimMoore  路  8Comments

TimMoore picture TimMoore  路  7Comments

kotdv picture kotdv  路  7Comments