diff --git a/build.gradle b/build.gradle index 0ebc722a..de23e44f 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,10 @@ configure(subprojects.findAll { it.name != "kotysa-platform" }) { } test { - useJUnitPlatform() + useJUnitPlatform { + // TODO remove this exclusion when https://github.com/spring-projects-experimental/spring-fu/issues/322 is fixed + excludeTags("spring-jdbc-testcontainers") + } testLogging { events 'passed', 'failed', 'skipped' showStandardStreams = true @@ -148,6 +151,6 @@ task build { // when version changes : // -> execute ./gradlew wrapper, then delete .gradle directory, then execute ./gradlew wrapper again wrapper { - gradleVersion = '6.6.1' + gradleVersion = '6.7' distributionType = Wrapper.DistributionType.ALL } diff --git a/gradle.properties b/gradle.properties index e1711e66..e2a98bf2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ version=0.1.8 # plugins kotlin_plugin_version=1.4.10 # https://github.com/Kotlin/dokka/releases -dokka_plugin_version=1.4.10 +dokka_plugin_version=1.4.10.2 # https://github.com/researchgate/gradle-release/releases release_plugin_version=2.8.1 @@ -12,13 +12,13 @@ release_plugin_version=2.8.1 # https://github.com/ufoss-org/kolog/releases kolog_version=0.3 # https://github.com/Kotlin/kotlinx.coroutines/releases -kotlinx_coroutines_bom_version=1.3.9 +kotlinx_coroutines_bom_version=1.4.0 # https://github.com/Kotlin/kotlinx-datetime/releases kotlinx_datetime_version=0.1.0 # https://github.com/reactor/reactor-kotlin-extensions/releases -reactor_kotlin_extension_version=1.1.0-RC1 +reactor_kotlin_extension_version=1.1.0 # https://github.com/spring-projects/spring-framework/releases -spring_core_version=5.3.0-RC1 +spring_core_version=5.3.0 # tests # https://mvnrepository.com/artifact/org.assertj/assertj-core diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 33682bbb..14e30f74 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/kotysa-spring-jdbc/src/test/kotlin/org/ufoss/kotysa/spring/jdbc/mysql/AbstractSpringJdbcMysqlTest.kt b/kotysa-spring-jdbc/src/test/kotlin/org/ufoss/kotysa/spring/jdbc/mysql/AbstractSpringJdbcMysqlTest.kt index 2a9bda4e..1b87a851 100644 --- a/kotysa-spring-jdbc/src/test/kotlin/org/ufoss/kotysa/spring/jdbc/mysql/AbstractSpringJdbcMysqlTest.kt +++ b/kotysa-spring-jdbc/src/test/kotlin/org/ufoss/kotysa/spring/jdbc/mysql/AbstractSpringJdbcMysqlTest.kt @@ -5,6 +5,7 @@ package org.ufoss.kotysa.spring.jdbc.mysql import org.junit.jupiter.api.AfterAll +import org.junit.jupiter.api.Tag import org.springframework.beans.factory.getBean import org.springframework.boot.context.event.ApplicationReadyEvent import org.springframework.context.ConfigurableApplicationContext @@ -15,8 +16,8 @@ import org.ufoss.kotysa.test.Repository class KMySQLContainer : MySQLContainer("mysql:8.0.22") - - abstract class AbstractSpringJdbcMysqlTest { +@Tag("spring-jdbc-testcontainers") +abstract class AbstractSpringJdbcMysqlTest { protected abstract val repository: T diff --git a/kotysa-spring-jdbc/src/test/kotlin/org/ufoss/kotysa/spring/jdbc/postgresql/AbstractSpringJdbcPostgresqlTest.kt b/kotysa-spring-jdbc/src/test/kotlin/org/ufoss/kotysa/spring/jdbc/postgresql/AbstractSpringJdbcPostgresqlTest.kt index 3f26f71e..83695e65 100644 --- a/kotysa-spring-jdbc/src/test/kotlin/org/ufoss/kotysa/spring/jdbc/postgresql/AbstractSpringJdbcPostgresqlTest.kt +++ b/kotysa-spring-jdbc/src/test/kotlin/org/ufoss/kotysa/spring/jdbc/postgresql/AbstractSpringJdbcPostgresqlTest.kt @@ -5,6 +5,7 @@ package org.ufoss.kotysa.spring.jdbc.postgresql import org.junit.jupiter.api.AfterAll +import org.junit.jupiter.api.Tag import org.springframework.beans.factory.getBean import org.springframework.boot.context.event.ApplicationReadyEvent import org.springframework.context.ConfigurableApplicationContext @@ -15,7 +16,7 @@ import org.ufoss.kotysa.test.Repository class KPostgreSQLContainer : PostgreSQLContainer("postgres:13.0-alpine") - +@Tag("spring-jdbc-testcontainers") abstract class AbstractSpringJdbcPostgresqlTest { protected abstract val repository: T diff --git a/kotysa-spring-r2dbc/src/main/kotlin/org/ufoss/kotysa/r2dbc/CoroutinesSqlClientSelectR2dbc.kt b/kotysa-spring-r2dbc/src/main/kotlin/org/ufoss/kotysa/r2dbc/CoroutinesSqlClientSelectR2dbc.kt index 8a2ef408..a96a0f27 100644 --- a/kotysa-spring-r2dbc/src/main/kotlin/org/ufoss/kotysa/r2dbc/CoroutinesSqlClientSelectR2dbc.kt +++ b/kotysa-spring-r2dbc/src/main/kotlin/org/ufoss/kotysa/r2dbc/CoroutinesSqlClientSelectR2dbc.kt @@ -29,7 +29,7 @@ internal class CoroutinesSqlClientSelectR2dbc private constructor() : AbstractSq Joinable(client, properties, joinClass, alias, type) } - private class Joinable internal constructor( + private class Joinable( private val client: DatabaseClient, private val properties: Properties, private val joinClass: KClass, @@ -44,7 +44,7 @@ internal class CoroutinesSqlClientSelectR2dbc private constructor() : AbstractSq } } - private class Join internal constructor( + private class Join( override val client: DatabaseClient, override val properties: Properties ) : DefaultSqlClientSelect.Join, CoroutinesSqlClientSelect.Join, Whereable, Return @@ -59,7 +59,7 @@ internal class CoroutinesSqlClientSelectR2dbc private constructor() : AbstractSq } } - private class Where internal constructor( + private class Where( override val client: DatabaseClient, override val properties: Properties ) : DefaultSqlClientSelect.Where, CoroutinesSqlClientSelect.Where, Return { @@ -95,12 +95,12 @@ internal class CoroutinesSqlClientSelectR2dbc private constructor() : AbstractSq override suspend fun fetchFirst(): T = try { - fetch().awaitFirst() + fetch().awaitSingle() } catch (_: EmptyResultDataAccessException) { throw NoResultException() } - override suspend fun fetchFirstOrNull(): T? = fetch().awaitFirstOrNull() + override suspend fun fetchFirstOrNull(): T? = fetch().awaitSingleOrNull() override fun fetchAll(): Flow = fetch().flow() }