[ https://issues.apache.org/jira/browse/KAFKA-4049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15429595#comment-15429595 ]
ASF GitHub Bot commented on KAFKA-4049: --------------------------------------- GitHub user guozhangwang reopened a pull request: https://github.com/apache/kafka/pull/1746 KAFKA-4049: Fix transient failure in RegexSourceIntegrationTest You can merge this pull request into a Git repository by running: $ git pull https://github.com/guozhangwang/kafka K4049-RegexSourceIntegrationTest-failure Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1746.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 #1746 ---- commit e045b977cc5607e72402e64547df773d9bda7a61 Author: Guozhang Wang <wangg...@gmail.com> Date: 2016-08-16T20:08:27Z fix transient failure commit 0f21348e9e48f1e6789060b70b01816cd3baac62 Author: Guozhang Wang <wangg...@gmail.com> Date: 2016-08-17T22:41:41Z github comments commit 33e8e2cd62adb38a0cef266f533110b2f42dafe2 Author: Guozhang Wang <wangg...@gmail.com> Date: 2016-08-20T17:51:19Z Merge branch 'trunk' of https://git-wip-us.apache.org/repos/asf/kafka into K4049-RegexSourceIntegrationTest-failure commit 75206faee4306184cff8c136556444d60de1358e Author: Guozhang Wang <wangg...@gmail.com> Date: 2016-08-21T00:36:33Z make atomic updates on assignedTopicPartitions ---- > Transient failure in > RegexSourceIntegrationTest.testRegexMatchesTopicsAWhenDeleted > ---------------------------------------------------------------------------------- > > Key: KAFKA-4049 > URL: https://issues.apache.org/jira/browse/KAFKA-4049 > Project: Kafka > Issue Type: Sub-task > Components: streams > Reporter: Guozhang Wang > Assignee: Guozhang Wang > Labels: test > > There is an hidden assumption in this test case that the created > {{TEST-TOPIC-A}} and {{TEST-TOPIC-B}} are propagated to the streams client at > the same time, and stored as {{assignedTopicPartitions[0]}}. However this is > not always true since these two topics may be added on the client side as two > consecutive metadata refreshes. > The proposed fix includes the following: > 1. In {{waitForCondition}} do not trigger the {{conditionMet}} function again > after the while loop, but just remember the returned value from the last > call. This is safer so that if the condition changes after the while loop it > will not be considered as well. > 2. Not remembering a map of all the previous assigned partitions, but only > the most recent one. And also get rid of the final check after streams client > is closed by just use {{equals}} in the condition to make sure that it is > exactly the same to the expected assignment. -- This message was sent by Atlassian JIRA (v6.3.4#6332)