[
https://issues.apache.org/jira/browse/KAFKA-3637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15289271#comment-15289271
]
Thomas Szymanski commented on KAFKA-3637:
-----------------------------------------
Hi, I would like to take this one to start with the Kafka project.
I started started to write the production code, but am having issue with the
replacement of Thread.sleep() occurences in tests.
TestUtils is a scala class and waitUntilTrue takes a () => Boolean and it seems
like this requires to instanciate a Function0<Boolean> to give it as a
parameter every time in java code.
Even if a kind of wrapper for this is done in IntegrationTestUtils, I am not
sure this would be the right way to do in order to keep the tests readable.
Can someone git an hint about it ?
> Add method that checks if streams are initialised
> -------------------------------------------------
>
> Key: KAFKA-3637
> URL: https://issues.apache.org/jira/browse/KAFKA-3637
> Project: Kafka
> Issue Type: Sub-task
> Components: streams
> Affects Versions: 0.10.1.0
> Reporter: Eno Thereska
> Assignee: Liquan Pei
> Labels: newbie
> Fix For: 0.10.1.0
>
>
> Currently when streams are initialised and started with streams.start(),
> there is no way for the caller to know if the initialisation procedure
> (including starting tasks) is complete or not. Hence, the caller is forced to
> guess for how long to wait. It would be good to have a way to return the
> state of the streams to the caller.
> One option would be to follow a similar approach in Kafka Server
> (BrokerStates.scala).
> As part of this change, we must remove the Thread.sleep() call in the Kafka
> Streams integration tests and substitute it with TestUtils.waitUntilTrue().
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)