> On July 23, 2015, 7:19 a.m., Ashish Singh wrote: > > clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetcherTest.java, > > line 173 > > <https://reviews.apache.org/r/36681/diff/2/?file=1019197#file1019197line173> > > > > getAllTopics is a blocking call and we need to send a response for it > > to complete, hence the thread. Let me know if it still does not makes sense. > > Jason Gustafson wrote: > But if you use the mockClient.prepareResponse, then you don't need the > thread, right? The response will be ready when the blocking call is invoked, > and it can return immediately. There are some examples of testing blocking > calls in CoordinatorTest.
Yes, but sending response before request sounds counter-intuitive to me. However, I do agree that it will not have any effect on expected behavior of test and reduce the complexity. > On July 23, 2015, 7:19 a.m., Ashish Singh wrote: > > core/src/test/scala/integration/kafka/api/ConsumerTest.scala, line 198 > > <https://reviews.apache.org/r/36681/diff/2/?file=1019198#file1019198line198> > > > > I don't think it is an issue. Hope it's OK to drop the issue. Thanks > > for the review though. > > Ismael Juma wrote: > I have to say that I also find the naming unusual. Normally `Map` is a > suffix and not a prefix. Particularly important because `map` is also a > method name and the way it's written it sounds like we're mapping something > (i.e. a method name versus a noun). Renamed it to be more inline with other usages of Map of topic and its partitions. - Ashish ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/36681/#review92730 ----------------------------------------------------------- On July 23, 2015, 4:34 p.m., Ashish Singh wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/36681/ > ----------------------------------------------------------- > > (Updated July 23, 2015, 4:34 p.m.) > > > Review request for kafka. > > > Bugs: KAFKA-2275 > https://issues.apache.org/jira/browse/KAFKA-2275 > > > Repository: kafka > > > Description > ------- > > Modify FetcherTest.testGetAllTopics to not use bg thread for creating > request. Rename mapTopicParts -> topics > > > Move getAllTopics from ConsumerNetworkClient to Fetcher. Add an unit test for > Fetcher.getAllTopics. Do not ignore__consumer_offsets topic while getting all > topics. Remove braces for single line if > > > KAFKA-2275: Add a ListTopics() API to the new consumer > > > Diffs > ----- > > clients/src/main/java/org/apache/kafka/clients/ClientRequest.java > ed4c0d98596cc294757f35df8c8cbc8e36ff42de > clients/src/main/java/org/apache/kafka/clients/NetworkClient.java > 48fe7961e2215372d8033ece4af739ea06c6457b > clients/src/main/java/org/apache/kafka/clients/consumer/Consumer.java > 252b759c0801f392e3526b0f31503b4b8fbf1c8a > clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java > bea3d737c51be77d5b5293cdd944d33b905422ba > clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java > c14eed1e95f2e682a235159a366046f00d1d90d6 > > clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java > d595c1cb07909e21946532501f648be3033603d9 > > clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetcherTest.java > 7a4e586c1a0c52931a8ec55b6e1d5b67c67c28ea > core/src/test/scala/integration/kafka/api/ConsumerTest.scala > 3eb5f95731a3f06f662b334ab2b3d0ad7fa9e1ca > > Diff: https://reviews.apache.org/r/36681/diff/ > > > Testing > ------- > > > Thanks, > > Ashish Singh > >