thanksforallthefish
08/26/2020, 8:02 AM09:58:23.088 [main] DEBUG org.testcontainers.utility.TestcontainersConfiguration - Testcontainers configuration overrides will be loaded from file:/Users/marco/.testcontainers.properties
~~~ Kotest Configuration ~~~
-> Parallelization factor: 1
-> Default test timeout: 600000ms
-> Default test order: Sequential
-> Default isolation mode: SingleInstance
-> Global soft assertations: False
-> Write spec failure file: False
-> Fail on ignored tests: False
-> Spec execution order: SpecExecutionOrder
-> Extensions
- io.kotest.spring.SpringAutowireConstructorExtension
- io.kotest.engine.extensions.SystemPropertyTagExtension
- io.kotest.core.extensions.RuntimeTagExtension
- io.kotest.engine.extensions.RuntimeTagExpressionExtension
- io.kotest.engine.extensions.SpecifiedTagsTagExtension
-> Listeners
- io.kotest.provided.PostgresListener
- io.kotest.spring.SpringListener
- class io.kotest.provided.ProjectConfig$listeners$1
- class io.kotest.engine.config.LoadConfigFromClasspathKt$toDetectedConfig$beforeAfterAllListener$1
Process finished with exit code 0
on some tests, while others run correctly. is there something I can do to increase verbose(ness) and understand what is going on? I upgraded the kotlin plugin (the jetbrains one) to 1.4, but still run on kotlin 1.3.
I already even tried to upgrade to kotlin 1.4 and kotest 4.2.0 but still getting this weird behavior.
I am using latest kotest plugin, 1.16sam
08/26/2020, 8:17 AMthanksforallthefish
08/26/2020, 8:19 AMthanksforallthefish
08/26/2020, 8:19 AMthanksforallthefish
08/26/2020, 8:20 AMobject PostgresListener : ProjectListener {
private val withNetworkAliases = PostgreSQLContainerProvider().newInstance("10")
.withNetwork(Network.SHARED)
.withNetworkAliases("db")
override suspend fun beforeProject() {
withContext(<http://Dispatchers.IO|Dispatchers.IO>) {
withNetworkAliases.start()
System.setProperty("spring.datasource.url", "jdbc:postgresql://${withNetworkAliases.connectionString()}")
System.setProperty("spring.datasource.username", withNetworkAliases.getUsername())
System.setProperty("spring.datasource.password", withNetworkAliases.getPassword())
System.setProperty("spring.flyway.schemas", withNetworkAliases.getDatabaseName())
}
}
override suspend fun afterProject() {
withContext(<http://Dispatchers.IO|Dispatchers.IO>) {
withNetworkAliases.stop()
}
}
private fun JdbcDatabaseContainer<*>.connectionString() = "${getHost()}:${getFirstMappedPort()}/${getDatabaseName()}"
override val name = "PostgresListener"
}
I don’t know why I did withContext(<http://Dispatchers.IO|Dispatchers.IO>)
, the git comment only says upgrade to kotest 4.1
, but if I remove it it all works finethanksforallthefish
08/26/2020, 8:22 AMsam
08/26/2020, 8:22 AMsam
08/26/2020, 8:23 AMthanksforallthefish
08/26/2020, 8:55 AM