You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/20 16:00:34 UTC
[GitHub] [flink-connector-jdbc] eskabetxe opened a new pull request, #12: [FLINK-27940] Migrate tests to junit5
eskabetxe opened a new pull request, #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12
All tests migrated to Junit5
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] eskabetxe commented on a diff in pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
eskabetxe commented on code in PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#discussion_r1055537648
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/dialect/sqlserver/SqlServerPreparedStatementTest.java:
##########
@@ -26,7 +26,7 @@
import static org.assertj.core.api.Assertions.assertThat;
/** Tests for {@link SqlServerPreparedStatementTest}. */
-class SqlServerPreparedStatementTest {
+public class SqlServerPreparedStatementTest {
Review Comment:
I start removing all from class but a lot are needed as we extend a lot..
I will remove where posible
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] wanglijie95 commented on pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
wanglijie95 commented on PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#issuecomment-1360686642
@eskabetxe Please feel free to take it. I will assign it to you. And I can help to review this pr :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] eskabetxe commented on a diff in pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
eskabetxe commented on code in PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#discussion_r1053484871
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/xa/JdbcXaSinkMigrationTest.java:
##########
@@ -77,7 +79,8 @@ public JdbcXaSinkMigrationTest(FlinkVersion readVersion) {
private final FlinkVersion readVersion;
- @Test
+ @TestTemplate
+ @Disabled
Review Comment:
I have to disable this as getReadVersions return a empty list..
This method appear to be used only manually as nothing is tested in normal execution.
I try to return some FlinkVersion but resources are missing :S
I get this error:
`java.io.FileNotFoundException: src/test/resources/jdbc-exactly-once-sink-migration-1.16-snapshot (No such file or directory)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] wanglijie95 commented on a diff in pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
wanglijie95 commented on code in PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#discussion_r1055463333
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/catalog/MySqlCatalogTestBase.java:
##########
@@ -140,10 +140,18 @@ public static void beforeAll() throws SQLException {
}
}
- @AfterClass
- public static void cleanup() {
+ @AfterAll
+ static void cleanup() {
for (MySQLContainer<?> container : MYSQL_CONTAINERS.values()) {
container.stop();
}
}
+
Review Comment:
These 2 methods seem useless
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/dialect/sqlserver/SqlServerTableSinkITCase.java:
##########
@@ -81,9 +86,8 @@ public class SqlServerTableSinkITCase extends AbstractTestBase {
public static final String OUTPUT_TABLE5 = "checkpointTable";
public static final String USER_TABLE = "USER_TABLE";
- @BeforeClass
- public static void beforeAll() throws ClassNotFoundException, SQLException {
- container.start();
+ @BeforeAll
+ static void beforeAll() throws ClassNotFoundException, SQLException {
Review Comment:
Why remove `container.start` ?
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/xa/JdbcXaSinkMigrationTest.java:
##########
@@ -77,7 +79,8 @@ public JdbcXaSinkMigrationTest(FlinkVersion readVersion) {
private final FlinkVersion readVersion;
- @Test
+ @TestTemplate
+ @Disabled
Review Comment:
It would be better to add comments to explain it.
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/dialect/sqlserver/SqlServerPreparedStatementTest.java:
##########
@@ -26,7 +26,7 @@
import static org.assertj.core.api.Assertions.assertThat;
/** Tests for {@link SqlServerPreparedStatementTest}. */
-class SqlServerPreparedStatementTest {
+public class SqlServerPreparedStatementTest {
Review Comment:
[JUnit 5 Migration Guide](https://docs.google.com/document/d/1514Wa_aNB9bJUen4xm5uiuXOooOJTtXqS_Jqk9KJitU) recommends omitting the public modifier for them(classes, test methods, and lifecycle methods) unless there is a technical reason.
I think it's ok to leave it as is, and we should remove the `public` modifier of other test classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] eskabetxe commented on a diff in pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
eskabetxe commented on code in PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#discussion_r1055532277
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/xa/JdbcXaSinkMigrationTest.java:
##########
@@ -77,7 +79,8 @@ public JdbcXaSinkMigrationTest(FlinkVersion readVersion) {
private final FlinkVersion readVersion;
- @Test
+ @TestTemplate
+ @Disabled
Review Comment:
I would like to remove the disable (as it will unable to test manually without touch it) but I dont see how..
Or if is not used at all, remove the class
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] boring-cyborg[bot] commented on pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#issuecomment-1363566786
Awesome work, congrats on your first merged pull request!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] wanglijie95 merged pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
wanglijie95 merged PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] eskabetxe commented on a diff in pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
eskabetxe commented on code in PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#discussion_r1055534726
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/catalog/MySqlCatalogTestBase.java:
##########
@@ -140,10 +140,18 @@ public static void beforeAll() throws SQLException {
}
}
- @AfterClass
- public static void cleanup() {
+ @AfterAll
+ static void cleanup() {
for (MySQLContainer<?> container : MYSQL_CONTAINERS.values()) {
container.stop();
}
}
+
Review Comment:
Correct this was from a previous attempt
removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] eskabetxe commented on a diff in pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
eskabetxe commented on code in PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#discussion_r1055536159
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/dialect/sqlserver/SqlServerTableSinkITCase.java:
##########
@@ -81,9 +86,8 @@ public class SqlServerTableSinkITCase extends AbstractTestBase {
public static final String OUTPUT_TABLE5 = "checkpointTable";
public static final String USER_TABLE = "USER_TABLE";
- @BeforeClass
- public static void beforeAll() throws ClassNotFoundException, SQLException {
- container.start();
+ @BeforeAll
+ static void beforeAll() throws ClassNotFoundException, SQLException {
Review Comment:
with Testcontainer and Container annotations this is not needed..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] wanglijie95 commented on pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
wanglijie95 commented on PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#issuecomment-1363566314
Merged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] eskabetxe commented on a diff in pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
eskabetxe commented on code in PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#discussion_r1055537648
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/dialect/sqlserver/SqlServerPreparedStatementTest.java:
##########
@@ -26,7 +26,7 @@
import static org.assertj.core.api.Assertions.assertThat;
/** Tests for {@link SqlServerPreparedStatementTest}. */
-class SqlServerPreparedStatementTest {
+public class SqlServerPreparedStatementTest {
Review Comment:
I start removing all from class but a lot are needed as we extend a lot..
To have half with public and half without I left all with public to be more consistent.
I will remove where posible (done)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] eskabetxe commented on a diff in pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
eskabetxe commented on code in PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#discussion_r1055536159
##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/dialect/sqlserver/SqlServerTableSinkITCase.java:
##########
@@ -81,9 +86,8 @@ public class SqlServerTableSinkITCase extends AbstractTestBase {
public static final String OUTPUT_TABLE5 = "checkpointTable";
public static final String USER_TABLE = "USER_TABLE";
- @BeforeClass
- public static void beforeAll() throws ClassNotFoundException, SQLException {
- container.start();
+ @BeforeAll
+ static void beforeAll() throws ClassNotFoundException, SQLException {
Review Comment:
with @Testcontainer and @Container annotations this is not needed..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink-connector-jdbc] eskabetxe commented on pull request #12: [FLINK-27940] Migrate tests to junit5
Posted by GitBox <gi...@apache.org>.
eskabetxe commented on PR #12:
URL: https://github.com/apache/flink-connector-jdbc/pull/12#issuecomment-1361065762
@wanglijie95 its ready to be reviewed..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org