Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default mysql r2dbc dependency to io.asyncer:r2dbc-mysql #2584

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading