Stian N
09/19/2019, 10:39 AMthanksforallthefish
09/19/2019, 11:01 AM@Transactional
(which you want to use around tests, so data modifications performed by the test are automatically rollbacked, otherwise you alter the data for subsequent tests and you become somehow dependent on the execution order) create a proxy around a method, but kotlintest does not really creates methodsthanksforallthefish
09/19/2019, 11:05 AMio.kotlintest.provided.ProjectConfig
like
class ProjectConfig : AbstractProjectConfig() {
override fun beforeAll() {
start postgres
}
override fun afterAll() {
stop postgres
}
}
and I think it should work without needing to extend anything.
If I am not wrong, those two methods are run before/after the first/last test. It might get annoying with pure unit test and running them locally, as postgres would start for them too (but you can consider multiple test sourcesets if you are using gradle, one for regular tests and one for postgres dependent one)LeoColman
09/19/2019, 2:53 PM@Transactional
at the class level, and set the isolation mode to instance per testLeoColman
09/19/2019, 2:53 PMLeoColman
09/19/2019, 2:55 PMTestListener
?sam
09/19/2019, 3:34 PMChristian Dräger
10/10/2019, 11:52 AMthanksforallthefish
10/10/2019, 1:30 PM