This repository was archived by the owner on Feb 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
main/kotlin/io/kotest/extensions/testcontainers
test/kotlin/io/kotest/extensions/testcontainers Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -93,15 +93,15 @@ class JdbcDatabaseContainerExtension(
9393 }
9494
9595 override suspend fun beforeTest (testCase : TestCase ) {
96- beforeTest(testCase, dataSource ? : error(" Datasource not initialized" ))
96+ beforeTest.invoke (testCase, dataSource ? : error(" Datasource not initialized" ))
9797 }
9898
9999 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" ))
101101 }
102102
103103 override suspend fun beforeSpec (spec : Spec ) {
104- beforeSpec(spec)
104+ beforeSpec.invoke (spec)
105105 }
106106
107107 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 {
1414 withUrlParam(" zeroDateTimeBehavior" , " convertToNull" )
1515}
1616
17- private val ext = SharedJdbcDatabaseContainerExtension (mysql) {
18- maximumPoolSize = 8
19- minimumIdle = 4
20- }
17+ private val ext = JdbcDatabaseContainerExtension (mysql)
2118
2219class SharedJdbcTestContainerExtensionSpecTest1 : FunSpec () {
2320 init {
2421
25- val ds = install(ext)
22+ val ds = install(ext) {
23+ maximumPoolSize = 8
24+ minimumIdle = 4
25+ }
2626
2727 test(" should initialize once per module" ) {
2828 ds.connection.use {
You can’t perform that action at this time.
0 commit comments