You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/15 16:11:41 UTC

[jira] [Commented] (FLINK-6307) Refactor JDBC tests

    [ https://issues.apache.org/jira/browse/FLINK-6307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15970011#comment-15970011 ] 

ASF GitHub Bot commented on FLINK-6307:
---------------------------------------

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/3723

    [FLINK-6307] [jdbc] Refactor JDBC tests

    Builds on top of #3686.
    
    List of changes:
    
    JDBCFullTest:
    - split testJdbcInOut into 2 methods to avoid manul test-lifecycle calls
    JDBCTestBase:
    - remove all qualified static accesses
    - remove static Connection field
    - remove (now) unused prepareTestDB method
    - create RowTypeInfo directly instead of first allocating a separate
    TypeInfo[]
    - rename testData to TEST_DATA in-line with naming conventions
    - rework test data to not rely on Object arrays
    
    JDBCInputFormatTest:
    - call InputFormat#closeInputFormat() in tearDown()
    - simplify method exception declarations
    - remove unreachable branch when format returns null (this should fail
    the test)
    - replace loops over splits with for-each loops
    - rework comparisons; no longer ignore nulls, no longer check class,
    compare directly against expected value
    
    JDBCOutputFormatTest:
    - directly create Row instead of first creating a tuple
    - simplify method exception declarations
    
    General:
    - do not catch exceptions if the catch block only calls Assert.fail()

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink 6307_jdbc_tests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3723.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3723
    
----
commit 993a712eaff4b7b29dbcd45897e3afe7323256a7
Author: Flavio Pompermaier <f....@gmai.com>
Date:   2017-04-06T10:01:51Z

    [FLINK-6271] [jdbc] Fix NPE when there's a single split
    
    This closes #3686.

commit fb510ce440577d07b7cd7229db1a624a150e66b0
Author: zentol <ch...@apache.org>
Date:   2017-04-15T16:07:15Z

    [FLINK-6307] [jdbc] Refactor JDBC tests
    
    JDBCFullTest:
    - split testJdbcInOut into 2 methods to avoid manul test-lifecycle calls
    JDBCTestBase:
    - remove all qualified static accesses
    - remove static Connection field
    - remove (now) unused prepareTestDB method
    - create RowTypeInfo directly instead of first allocating a separate
    TypeInfo[]
    - rename testData to TEST_DATA in-line with naming conventions
    - rework test data to not rely on Object arrays
    
    JDBCInputFormatTest:
    - call InputFormat#closeInputFormat() in tearDown()
    - simplify method exception declarations
    - remove unreachable branch when format returns null (this should fail
    the test)
    - replace loops over splits with for-each loops
    - rework comparisons; no longer ignore nulls, no longer check class,
    compare directly against expected value
    
    JDBCOutputFormatTest:
    - directly create Row instead of first creating a tuple
    - simplify method exception declarations
    
    General:
    - do not catch exceptions if the catch block only calls Assert.fail()

----


> Refactor JDBC tests
> -------------------
>
>                 Key: FLINK-6307
>                 URL: https://issues.apache.org/jira/browse/FLINK-6307
>             Project: Flink
>          Issue Type: Improvement
>          Components: Batch Connectors and Input/Output Formats, Tests
>    Affects Versions: 1.3.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Minor
>             Fix For: 1.3.0
>
>
> While glancing over the JDBC related tests I've found a lot of odds things that accumulated over time.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)