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

ASF GitHub Bot commented on KAFKA-8782:
---------------------------------------

ijuma commented on pull request #7191: KAFKA-8782: Close metrics in 
QuotaManagerTests
URL: https://github.com/apache/kafka/pull/7191
 
 
   Since `Metrics` was constructed with `enableExpiration=false`, this was
   not a source of flakiness given the current implementation. This could
   change in the future, so good to follow the class contract.
   
   Included a few clean-ups with regards to redundant casts and type parameters
   as well as usage of try with resources for inline usage of `Metrics`.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> ReplicationQuotaManagerTest and ClientQuotaManagerTest should close Metrics 
> object
> ----------------------------------------------------------------------------------
>
>                 Key: KAFKA-8782
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8782
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.2.1
>            Reporter: Anna Povzner
>            Assignee: Ismael Juma
>            Priority: Major
>              Labels: newbie
>
> ReplicationQuotaManagerTest and ClientQuotaManagerTest create Metrics objects 
> in several tests, but do not close() them in the end. It would be good to 
> cleanup resources in those tests, which also helps with reducing overall test 
> flakiness.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to