HoustonPutman commented on code in PR #4226:
URL: https://github.com/apache/solr/pull/4226#discussion_r2955286820


##########
solr/core/src/test/org/apache/solr/blockcache/BufferStoreTest.java:
##########
@@ -50,6 +51,8 @@ public void setup() {
   @After
   public void clearBufferStores() {
     BufferStore.clearBufferStores();
+    org.apache.solr.common.util.IOUtils.closeQuietly(metrics);

Review Comment:
   Feel like this can be imported...



##########
solr/core/src/test/org/apache/solr/search/TestThinCache.java:
##########
@@ -99,13 +100,14 @@ public static void setupSolrHome() throws Exception {
   String registry = TestUtil.randomSimpleString(random(), 2, 10);
 
   @Test
-  public void testSimple() {
+  public void testSimple() throws IOException {
     Object cacheScope = new Object();
     ThinCache.NodeLevelCache<Object, Integer, String> backing = new 
ThinCache.NodeLevelCache<>();
     ThinCache<Object, Integer, String> lfuCache = new ThinCache<>();
     String lfuCacheName = "lfu_cache";
     lfuCache.setBacking(cacheScope, backing);
-    SolrMetricsContext solrMetricsContext = new 
SolrMetricsContext(metricManager, registry);
+    var solrMetricsContext = new SolrMetricsContext(metricManager, registry);

Review Comment:
   Best to put this in a try-with-resources so that we don't get leaks on a 
failure.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to