-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add Timeplus module #8779
Add Timeplus module #8779
Conversation
modules/timeplus/src/test/java/org/testcontainers/TimeplusTestImages.java
Outdated
Show resolved
Hide resolved
modules/timeplus/src/main/java/org/testcontainers/containers/TimeplusContainer.java
Outdated
Show resolved
Hide resolved
1e57c4f
to
7f71364
Compare
56d393a
to
ece9945
Compare
private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd:2.2.10"); | ||
|
||
private static final DockerImageName TIMEPLUS_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd:2.3.3"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd:2.2.10"); | |
private static final DockerImageName TIMEPLUS_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd:2.3.3"); | |
private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@Deprecated | ||
public static final String IMAGE = DEFAULT_IMAGE_NAME.getUnversionedPart(); | ||
|
||
@Deprecated | ||
public static final String DEFAULT_TAG = "latest"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete deprecated constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i will do it
public static final Integer HTTP_PORT = 3128; | ||
|
||
public static final Integer NATIVE_PORT = 8463; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static final Integer HTTP_PORT = 3128; | |
public static final Integer NATIVE_PORT = 8463; | |
private static final Integer HTTP_PORT = 3128; | |
private static final Integer NATIVE_PORT = 8463; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
/** | ||
* @deprecated use {@link #TimeplusContainer(DockerImageName)} instead | ||
*/ | ||
@Deprecated | ||
public TimeplusContainer() { | ||
this(DEFAULT_IMAGE_NAME.withTag(DEFAULT_TAG)); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* @deprecated use {@link #TimeplusContainer(DockerImageName)} instead | |
*/ | |
@Deprecated | |
public TimeplusContainer() { | |
this(DEFAULT_IMAGE_NAME.withTag(DEFAULT_TAG)); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted
this.waitStrategy = | ||
new HttpWaitStrategy() | ||
.forStatusCode(200) | ||
.forResponsePredicate("Ok."::equals) | ||
.withStartupTimeout(Duration.ofMinutes(1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use waitingFor(Wait.forLog...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HttpWaitStrategy
seems don't have waitingFor
function, did you mean waitUntilReady
? Could you offer more info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, it is Wait.forHttp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need, thank you for telling me this, i'm not familiar with testconatiner
code, so please feel free to comment, i will fix them.
modules/timeplus/src/main/java/org/testcontainers/timeplus/TimeplusContainer.java
Show resolved
Hide resolved
fd8678c
to
ece9945
Compare
|
||
private static final String NAME = "timeplus"; | ||
|
||
private static final DockerImageName TIMEPLUS_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd:2.3.3"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use timeplus/timeplusd:develop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no we shouldn't use latest image, use stable version instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's removed. New modules do not provide an specific tag. It should be provided by the consumer.
private static final DockerImageName TIMEPLUS_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd:2.3.3"); |
JDBC_URL_PREFIX + | ||
getHost() + | ||
":" + | ||
getMappedPort(HTTP_PORT) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use NATIVE_PORT
instead of HTTP_PORT
this.waitStrategy = | ||
Wait | ||
.forHttp("/") | ||
.forStatusCode(200) | ||
.forResponsePredicate("Ok."::equals) | ||
.withStartupTimeout(Duration.ofMinutes(1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.waitStrategy = | |
Wait | |
.forHttp("/") | |
.forStatusCode(200) | |
.forResponsePredicate("Ok."::equals) | |
.withStartupTimeout(Duration.ofMinutes(1)); | |
this.waitStrategy = | |
Wait.forHttp("/timeplusd/v1/ping").forStatusCode(200).withStartupTimeout(Duration.ofMinutes(1)); |
d40dbeb
to
5597d18
Compare
5597d18
to
f50b0bb
Compare
Please, read the Pull request template and the instructions for new modules. |
baf1ce7
to
e6cce0f
Compare
later, will add the doc related |
|
||
private static final String NAME = "timeplus"; | ||
|
||
private static final DockerImageName TIMEPLUS_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd:2.3.3"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's removed. New modules do not provide an specific tag. It should be provided by the consumer.
private static final DockerImageName TIMEPLUS_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd:2.3.3"); |
this.waitStrategy = | ||
Wait.forHttp("/timeplusd/v1/ping").forStatusCode(200).withStartupTimeout(Duration.ofMinutes(1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.waitStrategy = | |
Wait.forHttp("/timeplusd/v1/ping").forStatusCode(200).withStartupTimeout(Duration.ofMinutes(1)); | |
waitFor( | |
Wait.forHttp("/timeplusd/v1/ping").forStatusCode(200).withStartupTimeout(Duration.ofMinutes(1))); |
withEnv("CLICKHOUSE_DB", this.databaseName); | ||
withEnv("CLICKHOUSE_USER", this.username); | ||
withEnv("CLICKHOUSE_PASSWORD", this.password); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are those env vars right?
56dc6bb
to
00536d1
Compare
docs/modules/databases/timeplus.md
Outdated
@@ -0,0 +1,24 @@ | |||
# timeplus Module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# timeplus Module | |
# Timeplus Module |
modules/timeplus/build.gradle
Outdated
|
||
testImplementation project(':jdbc-test') | ||
testRuntimeOnly 'com.timeplus:timeplus-native-jdbc:2.0.1' | ||
testImplementation 'org.assertj:assertj-core:3.25.3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testImplementation 'org.assertj:assertj-core:3.25.3' | |
testImplementation 'org.assertj:assertj-core:3.26.3' |
|
||
static final String DOCKER_IMAGE_NAME = "timeplus/timeplusd"; | ||
|
||
private static final DockerImageName TIMEPLUS_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static final DockerImageName TIMEPLUS_IMAGE_NAME = DockerImageName.parse("timeplus/timeplusd"); | |
private static final DockerImageName TIMEPLUS_IMAGE_NAME = DockerImageName.parse(DOCKER_IMAGE_NAME); |
|
||
@Override | ||
public String getUsername() { | ||
return username; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return username; | |
return this.username; |
|
||
@Override | ||
public String getPassword() { | ||
return password; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return password; | |
return this.password; |
|
||
@Override | ||
public String getDatabaseName() { | ||
return databaseName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return databaseName; | |
return this.databaseName; |
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
@RunWith(Parameterized.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be run without being Parameterized
db409c9
to
062c80b
Compare
062c80b
to
69a6974
Compare
@eddumelendez i have revised about these comments, could you please take a look again |
Hi @Jasmine-ge, tests are failing. Can you please take a look? |
Small thing: Please, add |
@eddumelendez Got it. Thank you very much for your help, I'm working on it. |
b29c4a9
to
6d9d81a
Compare
6d9d81a
to
858b0ca
Compare
@eddumelendez I've fixed the problem that causes the failure test and added the information. Also I‘ve changed our database version to a stable one. Could you please take a look? I'm deeply grateful for your time. |
Thanks for your contribution @lizhou1111, @Jasmine-ge ! The new module will be available in the next release. |
Timeplus is a simple, powerful, and cost-efficient stream processing platform. It's available in different ways:
Timeplus Proton: the core engine open-sourced at GitHub under Apache 2.0 License. It is a fast and lightweight streaming SQL engine.
Timeplus Enterprise: the production-ready commercial product, with 2 deployment options:
Cloud: a fully-managed unified platform for streaming and historical data processing.
Self-hosted: same feature sets as Timeplus Cloud, able to run and scale everywhere, from edge to your data center. Customize according to your configuration needs.
Timeplus provides powerful end-to-end capabilities to help data teams process streaming and historical data quickly and intuitively, accessible for organizations of all sizes and industries. It enables data engineers and platform engineers to unlock streaming data value using SQL.