This repository was archived by the owner on Feb 16, 2025. It is now read-only.
File tree 2 files changed +8
-8
lines changed
main/kotlin/io/kotest/extensions/testcontainers
test/kotlin/io/kotest/extensions/testcontainers
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -93,15 +93,15 @@ class JdbcDatabaseContainerExtension(
93
93
}
94
94
95
95
override suspend fun beforeTest (testCase : TestCase ) {
96
- beforeTest(testCase, dataSource ? : error(" Datasource not initialized" ))
96
+ beforeTest.invoke (testCase, dataSource ? : error(" Datasource not initialized" ))
97
97
}
98
98
99
99
override suspend fun afterTest (testCase : TestCase , result : TestResult ) {
100
- afterTest(testCase, dataSource ? : error(" Datasource not initialized" ))
100
+ afterTest.invoke (testCase, dataSource ? : error(" Datasource not initialized" ))
101
101
}
102
102
103
103
override suspend fun beforeSpec (spec : Spec ) {
104
- beforeSpec(spec)
104
+ beforeSpec.invoke (spec)
105
105
}
106
106
107
107
override suspend fun afterSpec (spec : Spec ) {
Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ private val mysql = MySQLContainer<Nothing>("mysql:8.0.26").apply {
14
14
withUrlParam(" zeroDateTimeBehavior" , " convertToNull" )
15
15
}
16
16
17
- private val ext = SharedJdbcDatabaseContainerExtension (mysql) {
18
- maximumPoolSize = 8
19
- minimumIdle = 4
20
- }
17
+ private val ext = JdbcDatabaseContainerExtension (mysql)
21
18
22
19
class SharedJdbcTestContainerExtensionSpecTest1 : FunSpec () {
23
20
init {
24
21
25
- val ds = install(ext)
22
+ val ds = install(ext) {
23
+ maximumPoolSize = 8
24
+ minimumIdle = 4
25
+ }
26
26
27
27
test(" should initialize once per module" ) {
28
28
ds.connection.use {
You can’t perform that action at this time.
0 commit comments