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

Bruno Cadonna commented on KAFKA-5676:
--------------------------------------

[~marcolotz] Thank you for your analysis!
 I agree that some aspects of the code can be improved. For example, it is 
questionable why methods like {{StreamsMetricsImpl#taskLevelSensor(...)}} are 
final. I do not share your concern about the static methods like 
{{StreamsMetricsImpl#addValueMetricToSensor(...)}}. They are utility methods 
that do not need the state of a {{StreamsMetricsImpl}} object. Some 
refactorings would maybe improve the situation. 

IMO, we should close this ticket as Won't Do and remove {{MockStreamsMetrics}} 
via KAFKA-8977. What do you think [~guozhang]?

> MockStreamsMetrics should be in o.a.k.test
> ------------------------------------------
>
>                 Key: KAFKA-5676
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5676
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>            Reporter: Guozhang Wang
>            Priority: Major
>              Labels: newbie
>          Time Spent: 96h
>  Remaining Estimate: 0h
>
> {{MockStreamsMetrics}}'s package should be `o.a.k.test` not 
> `o.a.k.streams.processor.internals`. 
> In addition, it should not require a {{Metrics}} parameter in its constructor 
> as it is only needed for its extended base class; the right way of mocking 
> should be implementing {{StreamsMetrics}} with mock behavior than extended a 
> real implementaion of {{StreamsMetricsImpl}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to