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

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

GitHub user zentol opened a pull request:

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

    [FLINK-5101] Refactor CassandraConnectorITCase

    This PR refactors the CassandraConnectorITCase to be a bit more stable and 
easier to debug.
    
    The following changes were made:
    * we no longer run actual flink jobs; all tests directly interact with the 
sink to save resources
    * every test uses a different table, preventing race conditions related to 
truncating the table
    * the at-least-once sinks were modified to track pending updates
    => the pojo sink was modified to use a method that returns an actually 
useful `Future`
    => since the sink waits in `close()` for pending updates it can no longer 
occur that a test checks a condition prematurely, improving stability
    * the initial connection is established across a time-span of 30 seconds, 
increasing the chance that cassandra has started before the tests are run

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

    $ git pull https://github.com/zentol/flink 4177_cass_test

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

    https://github.com/apache/flink/pull/2866.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 #2866
    
----
commit e2cb8b9dc1131422dc97c0c08cbacd39cb747a44
Author: zentol <[email protected]>
Date:   2016-11-23T15:59:22Z

    [FLINK-5101] Track pending records in CassandraSinkBase

commit 4c74937fac3e112f24a1af62d529153ce3aabb68
Author: zentol <[email protected]>
Date:   2016-11-23T16:29:51Z

    [FLINK-5101] Refactor CassandraConnectorITCase

----


> Test CassandraConnectorITCase instable
> --------------------------------------
>
>                 Key: FLINK-5101
>                 URL: https://issues.apache.org/jira/browse/FLINK-5101
>             Project: Flink
>          Issue Type: Bug
>          Components: Cassandra Connector
>            Reporter: Stefan Richter
>            Assignee: Chesnay Schepler
>
> I observed this test fail on Travis (very rarely):
>  
>  Running 
> org.apache.flink.streaming.connectors.cassandra.CassandraConnectorITCase
> Tests run: 7, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 80.843 sec 
> <<< FAILURE! - in 
> org.apache.flink.streaming.connectors.cassandra.CassandraConnectorITCase
> testCassandraBatchFormats(org.apache.flink.streaming.connectors.cassandra.CassandraConnectorITCase)
>   Time elapsed: 5.82 sec  <<< FAILURE!
> java.lang.AssertionError: expected:<40> but was:<20>
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.failNotEquals(Assert.java:834)
>       at org.junit.Assert.assertEquals(Assert.java:645)
>       at org.junit.Assert.assertEquals(Assert.java:631)
>       at 
> org.apache.flink.streaming.connectors.cassandra.CassandraConnectorITCase.testCassandraBatchFormats(CassandraConnectorITCase.java:442)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to