Simplify and accelerate test suite
Closed this issue · 0 comments
tsegismont commented
The test suite uses Vert.x Unit and Cassandra Unit. This is fine but we could leverage more features from both tools.
- Vert.x Unit
TestContext
object has methods to deal with asynchronous results (e.g.asyncAssertSuccess
) but we don't use them. Instead, we often use Vert.xFuture
with composition and validate the result manually. - Cassandra Unit has data loader classes to prepare a keyspace and run queries. They can be used instead of using the Vert.x client itself.[1]
Also, Cassandra clients instances are not managed with JUnit lifecycle methods.
Eventually, the base test class initializes two keyspaces before each test, and one of them is populated with a huge number of rows. These keyspaces could be created on demand and the number or rows inserted configured as needed.
[1] During the project inception, using our own dog food was important, as it was our main source of design feedback. But now test setup efficiency is more important.