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

David Smiley commented on SOLR-17368:
-------------------------------------

Bingo -- see DropWizard's {{SharedMetricRegistries.clear()}} method; I 
confirmed this can be used to fix the test!

It's tempting to consider adding this in SolrTestCase solrClassRules in an 
"afterAlways" (I tried this to verify the technique works) but vanishingly few 
tests should care (just TestPrometheusResponseWriter?), and SolrMetricManager 
documents they are shared across CoreContainers so it's not like the status quo 
is wrong.  So maybe just this test should call it in a BeforeClass and 
AfterClass.  WDYT [~hossman]?

> TestPrometheusResponseWriter redesign
> -------------------------------------
>
>                 Key: SOLR-17368
>                 URL: https://issues.apache.org/jira/browse/SOLR-17368
>             Project: Solr
>          Issue Type: Test
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Chris M. Hostetter
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 9.7
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> TestPrometheusResponseWriter currently fails in 100% of all jenkins builds 
> due to how it is designed, and depending on what other tests may run before 
> it in the same JVM.
> This problem only affects the test, not the functionality of the underlying 
> code.
> See SOLR-10654 for background discussions of the problems with this test, and 
> options for improving it's design relative to it's purpose.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to