nastra commented on code in PR #9282:
URL: https://github.com/apache/iceberg/pull/9282#discussion_r1423699018


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestCachedClientPool.java:
##########
@@ -28,30 +28,49 @@
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.iceberg.CatalogProperties;
 import org.apache.iceberg.CatalogUtil;
 import org.apache.iceberg.exceptions.ValidationException;
 import org.apache.iceberg.hive.CachedClientPool.Key;
 import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 
-public class TestCachedClientPool extends HiveMetastoreTest {
+public class TestCachedClientPool {
+
+  private static final String DB_NAME = "hivedb";
+
+  @RegisterExtension
+  private static final HiveMetastoreExtension HIVE_METASTORE_EXTENSION =
+      new HiveMetastoreExtension(DB_NAME, Collections.emptyMap());
 
   @Test
   public void testClientPoolCleaner() throws InterruptedException {
-    CachedClientPool clientPool = new CachedClientPool(hiveConf, 
Collections.emptyMap());
+    CatalogUtil.loadCatalog(

Review Comment:
   you should be able to pass the eviction interval like this (without having 
to initialize the catalog):
   
   ```
   CachedClientPool clientPool =
           new CachedClientPool(
               hiveConf,
               ImmutableMap.of(
                   CatalogProperties.CLIENT_POOL_CACHE_EVICTION_INTERVAL_MS,
                   String.valueOf(EVICTION_INTERVAL)));
   ```



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to