[ https://issues.apache.org/jira/browse/KAFKA-4588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15822084#comment-15822084 ]
ASF GitHub Bot commented on KAFKA-4588: --------------------------------------- GitHub user dguy opened a pull request: https://github.com/apache/kafka/pull/2371 KAFKA-4588: Wait for topics to be created in QueryableStateIntegrationTest.shouldNotMakeStoreAvailableUntilAllStoresAvailable After debugging this i can see the times that it fails there is a race between when the topic is actually created/ready on the broker and when the assignment happens. When it fails `StreamPartitionAssignor.assign(..)` gets called with a `Cluster` with no topics. Hence the test hangs as no tasks get assigned. To fix this I added a `waitForTopics` method to `EmbeddedKafkaCluster`. This will wait until the topics have been created. You can merge this pull request into a Git repository by running: $ git pull https://github.com/dguy/kafka integration-test-fix Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/2371.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 #2371 ---- commit 52f5792a41878a5decf26ad011178737096e0933 Author: Damian Guy <damian....@gmail.com> Date: 2017-01-13T16:51:49Z metadata hack commit c85facef85cfcfd25c7cae3560f4a098f0a97b92 Author: Damian Guy <damian....@gmail.com> Date: 2017-01-13T18:07:48Z wait for topics to be created ---- > QueryableStateIntegrationTest.shouldNotMakeStoreAvailableUntilAllStoresAvailable > is occasionally failing on jenkins > ------------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-4588 > URL: https://issues.apache.org/jira/browse/KAFKA-4588 > Project: Kafka > Issue Type: Sub-task > Components: streams > Affects Versions: 0.10.2.0 > Reporter: Damian Guy > Assignee: Damian Guy > Fix For: 0.10.2.0 > > > org.apache.kafka.streams.integration.QueryableStateIntegrationTest > > shouldNotMakeStoreAvailableUntilAllStoresAvailable[1] FAILED > java.lang.AssertionError: Condition not met within timeout 30000. waiting > for store count-by-key > at > org.apache.kafka.test.TestUtils.waitForCondition(TestUtils.java:259) > at > org.apache.kafka.streams.integration.QueryableStateIntegrationTest.shouldNotMakeStoreAvailableUntilAllStoresAvailable(QueryableStateIntegrationTest.java:502) -- This message was sent by Atlassian JIRA (v6.3.4#6332)