You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/11 22:14:02 UTC

[jira] [Commented] (SAMZA-1388) Flaky test - TestStatefulTask#testShouldStartAndRestore

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

ASF GitHub Bot commented on SAMZA-1388:
---------------------------------------

GitHub user jmakes opened a pull request:

    https://github.com/apache/samza/pull/269

    SAMZA-1388: Flaky test - TestStatefulTask#testShouldStartAndRestore

    I believe the problem originated from SAMZA-173.
    
    The core issue is testShouldRestoreStore was not updated to expect 6 messages after 2 more messages were added to testShouldStartTaskForFirstTime.
    
    Fixed the issue and refactored the code so the 2 methods wouldn't disagree again in the future.

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

    $ git pull https://github.com/jmakes/samza samza-1388

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

    https://github.com/apache/samza/pull/269.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 #269
    
----
commit 093488a9f63a6409042f4d7c6496b4ca503cd70f
Author: Jacob Maes <jm...@linkedin.com>
Date:   2017-08-11T22:09:58Z

    SAMZA-1388: Flaky test - TestStatefulTask#testShouldStartAndRestore

----


> Flaky test - TestStatefulTask#testShouldStartAndRestore
> -------------------------------------------------------
>
>                 Key: SAMZA-1388
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1388
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Jake Maes
>            Assignee: Jake Maes
>             Fix For: 0.14.0
>
>
> testShouldStartAndRestore FAILED
>     org.junit.ComparisonFailure: expected:<[4]> but was:<[99]>
>         at org.junit.Assert.assertEquals(Assert.java:123)
>         at org.junit.Assert.assertEquals(Assert.java:145)
>         at org.apache.samza.test.integration.StreamTaskTestUtil.send(StreamTaskTestUtil.scala:235)
>         at org.apache.samza.test.integration.TestStatefulTask.testShouldRestoreStore(TestStatefulTask.scala:134)
>         at org.apache.samza.test.integration.TestStatefulTask.testShouldStartAndRestore(TestStatefulTask.scala:77)
> https://builds.apache.org/job/samza-pr-checks/824/consoleFull
> I think it's because of this commit, which increased the number of messages produced to the topic but didn't adjust the expected number of messages to restore and the code has a race condition if doesn't wait for all the messages to be consumed. 
> https://github.com/apache/samza/commit/12594fb710260b62f9a21a8be785bd8dd5dcdd01



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)