-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[FLINK-35638] Refactor OceanBase test cases and remove dependency on host network #3439
Conversation
163b0e0
to
52006b1
Compare
87a9cc9
to
06afe10
Compare
9be64dc
to
b1edf22
Compare
@GOODBOY008 @ruanhang1993 PTAL |
@GOODBOY008 would you like to take a look at this PR when you have time? |
docs/content/docs/connectors/flink-sources/tutorials/oceanbase-tutorial.md
Outdated
Show resolved
Hide resolved
11e23b5
to
64ea6f1
Compare
…ve dependency on host network
Doc typo fixed, @GOODBOY008 PTAL. |
|
||
public Connection getJdbcConnection() throws SQLException { | ||
return DriverManager.getConnection( | ||
container.getJdbcUrl(databaseName), getUsername(), getPassword()); |
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.
@whhe It's wrong to get connection here, should be the implement like : org.apache.flink.cdc.connectors.oceanbase.OceanBaseTestBase#getJdbcConnection
.
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 is copied from UniqueDatabase in the mysql-cdc test module, and the database name it connects to is different from OceanBaseTestBase#getJdbcConnection. I think we can keep it.
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.
If ob in oracle
model and e2e test invork UniqueDatabase.getJdbcConnection
, what will happened?
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.
UniqueDatabase is instanced by a container object, so it can't be used for oracle mode now.
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.
So why not unify invoke org.apache.flink.cdc.connectors.oceanbase.OceanBaseTestBase#getJdbcConnection ?
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.
I didn't get you. The e2e test case is Parameterized, so I added the UniqueDatabase to create tables for different parameters. It's not a sub class of OceanBaseTestBase, if I want to connect to the unique database, it's straightforward to have a getJdbcConnection method in UniqueDatabase.
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.
LGTM
…ve dependency on host network (apache#3439)
…ve dependency on host network (apache#3439)
No description provided.