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

feat: add clickhouse r2dbc support #8434

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

livk-cloud
Copy link

@livk-cloud livk-cloud commented Mar 11, 2024

Added support for ClickHouse R2dbc and adjusted the dependency coordinates of clickhouse-jdbc

Fixes #8427

Copy link
Member

@eddumelendez eddumelendez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, @livk-cloud ! Can you please check the comments and please update the docs accordingly.

@@ -0,0 +1,46 @@
package org.testcontainers.containers;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure it is using ClickHouseContainer from org.testcontainers.clickhouse

Suggested change
package org.testcontainers.containers;
package org.testcontainers.clickhouse;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@livk-cloud check this comment.

@@ -25,9 +25,9 @@ public class ClickHouseContainer extends JdbcDatabaseContainer<ClickHouseContain

private static final DockerImageName CLICKHOUSE_IMAGE_NAME = DockerImageName.parse("clickhouse/clickhouse-server");

private static final Integer HTTP_PORT = 8123;
public static final Integer HTTP_PORT = 8123;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static final Integer HTTP_PORT = 8123;
static final Integer HTTP_PORT = 8123;


private static final Integer NATIVE_PORT = 9000;
public static final Integer NATIVE_PORT = 9000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static final Integer NATIVE_PORT = 9000;
static final Integer NATIVE_PORT = 9000;

testImplementation 'org.assertj:assertj-core:3.25.1'
testImplementation testFixtures(project(':r2dbc'))
testImplementation 'com.clickhouse:clickhouse-r2dbc:0.6.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to the docs http can be chosen for a small jar, similar to clickhouse-jdbc, why was not applied here?

Suggested change
testImplementation 'com.clickhouse:clickhouse-r2dbc:0.6.0'
testRuntimeOnly 'com.clickhouse:clickhouse-r2dbc:0.6.0'

testImplementation 'org.assertj:assertj-core:3.25.1'
testImplementation testFixtures(project(':r2dbc'))
testImplementation 'com.clickhouse:clickhouse-r2dbc:0.6.0'
testImplementation 'com.clickhouse:clickhouse-client:0.6.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clickhouse-r2dbc brings this dependency? or should be manually imported? should it be testRuntimeOnly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: clickhouse should be supported by r2dbc
2 participants