You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "hailong wang (Jira)" <ji...@apache.org> on 2020/01/20 03:47:00 UTC
[jira] [Commented] (FLINK-15676) Improve test code of
JDBCUpsertTableSinkITCase and JDBCLookupFunctionITCase
[ https://issues.apache.org/jira/browse/FLINK-15676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17019210#comment-17019210 ]
hailong wang commented on FLINK-15676:
--------------------------------------
My idea is simple, just replace
{code:java}
TableConnectorUtils.generateRuntimeName(getClass(), getTableSchema().getFieldNames());
{code}
with
{code:java}
List<String> fieldNames = ((RowType) getProducedDataType().getLogicalType()).getFieldNames(); return TableConnectorUtils.generateRuntimeName( getClass(), fieldNames.stream().toArray(String[]::new));
{code}
Are there some thing that have not been considered? [~lzljs3620320] [~jark]
> Improve test code of JDBCUpsertTableSinkITCase and JDBCLookupFunctionITCase
> ---------------------------------------------------------------------------
>
> Key: FLINK-15676
> URL: https://issues.apache.org/jira/browse/FLINK-15676
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / JDBC
> Affects Versions: 1.10.0
> Reporter: hailong wang
> Priority: Minor
> Fix For: 1.11.0
>
>
> JDBC Connector test code has basic class JDBCTestBase
> to create table, insert data and drop table. So we should extend it when we should look data from jdbc or insert. This will ensure the test code is clean. I found JDBCUpsertTableSinkITCase and JDBCLookupFunctionITCase create table and drop table by itself. So I think JDBCUpsertTableSinkITCase and JDBCLookupFunctionITCase should reflect to extend JDBCTestBase to reuse it.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)