Skip to content

Commit

Permalink
Change default mysql r2dbc dependency to io.asyncer:r2dbc-mysql (#2584)
Browse files Browse the repository at this point in the history
  • Loading branch information
radovanradic authored Sep 10, 2024
1 parent c74418f commit c98b4ac
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class MySQL extends MySQLCompatibleFeature {
public static final String NAME = "mysql";

private static final Dependency.Builder DEPENDENCY_R2DBC_MYSQL = Dependency.builder()
.groupId("dev.miku")
.groupId("io.asyncer")
.artifactId("r2dbc-mysql")
.runtime();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ class DataR2dbcSpec extends ApplicationContextSpec implements CommandOutputFixtu
!verifier.hasDependency('io.micronaut.sql', 'micronaut-jdbc-hikari')
}

void "test dependencies are present for gradle and mysql r2dbc"() {
when:
String template = new BuildBuilder(beanContext, BuildTool.GRADLE)
.features(["data-r2dbc", "mysql"])
.render()
BuildTestVerifier verifier = BuildTestUtil.verifier(BuildTool.GRADLE, template)

then:
jdbcFeature.name == 'jdbc-hikari'
verifier.hasDependency('io.micronaut.data', 'micronaut-data-processor', Scope.ANNOTATION_PROCESSOR)
verifier.hasDependency('io.micronaut.data', 'micronaut-data-r2dbc')
!verifier.hasDependency('io.micronaut.r2dbc', 'micronaut-r2dbc-core')
verifier.hasDependency('io.asyncer', 'r2dbc-mysql', Scope.RUNTIME)
!verifier.hasDependency('com.mysql', 'mysql-connector-j', Scope.RUNTIME)
!verifier.hasDependency('io.micronaut.sql', 'micronaut-jdbc-hikari')
}

void "test dependencies are present for gradle with TestContainers and #featureClassName"(Class<DatabaseDriverFeature> db) {
when:
def feature = beanContext.getBean(db)
Expand Down

0 comments on commit c98b4ac

Please sign in to comment.