You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/09/05 20:26:00 UTC

[jira] [Commented] (KAFKA-8878) Flaky Test AssignedStreamsTasksTest#shouldCloseCleanlyWithSuspendedTaskAndEOS

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

ASF GitHub Bot commented on KAFKA-8878:
---------------------------------------

cpettitt-confluent commented on pull request #7302: KAFKA-8878: Fix flaky test AssignedStreamsTasksTest#shouldCloseCleanl…
URL: https://github.com/apache/kafka/pull/7302
 
 
   …yWithSuspendedTaskAndEOS
   
   The previous approach to testing KAFKA-8412 was to look at the logs and
   determine if an error occurred during close. There was no direct way to
   detect than an exception occurred because the exception was eaten in
   `AssignedTasks.close`. In the PR for that ticket (#7207) it was
   acknowledged that this was a brittle way to test for the exception. We
   now see occasional failures because an unrelated ERROR level log entry
   is made while closing the task.
   
   This change eliminates the brittle log checking by rethrowing any time
   an exception occurs in close, even when a subsequent unclean close
   succeeds. This has the potential benefit of uncovering other supressed
   exceptions down the road.
   
   I've verified that even with us rethrowing on `closeUnclean` that all
   tests pass.
   
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Flaky Test AssignedStreamsTasksTest#shouldCloseCleanlyWithSuspendedTaskAndEOS
> -----------------------------------------------------------------------------
>
>                 Key: KAFKA-8878
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8878
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams, unit tests
>            Reporter: Matthias J. Sax
>            Assignee: Chris Pettitt
>            Priority: Major
>              Labels: flaky-test
>
> [https://builds.apache.org/blue/organizations/jenkins/kafka-trunk-jdk8/detail/kafka-trunk-jdk8/3887/tests]
> {quote}java.lang.AssertionError: Expected no ERROR message while closing assignedTasks, but got 1. First error: [AdminClient clientId=adminclient-67] Connection to node -1 (localhost/127.0.0.1:8080) could not be established. Broker may not be available.. Cause: N/A
> at org.junit.Assert.fail(Assert.java:89)
> at org.apache.kafka.streams.processor.internals.AssignedStreamsTasksTest.shouldCloseCleanlyWithSuspendedTaskAndEOS(AssignedStreamsTasksTest.java:555){quote}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)