pvary commented on a change in pull request #2119:
URL: https://github.com/apache/iceberg/pull/2119#discussion_r567802401



##########
File path: 
hive-metastore/src/test/java/org/apache/iceberg/hive/TestClientPool.java
##########
@@ -51,4 +81,918 @@ protected void close(Object client) {
 
     }
   }
+
+  private static class MockHiveClientPool extends ClientPool<IMetaStoreClient, 
Exception> {
+
+    MockHiveClientPool(int poolSize, Class<? extends Exception> reconnectExc) {
+      super(poolSize, reconnectExc);
+    }
+
+    @Override
+    protected IMetaStoreClient newClient() {
+      return new MockMetaStoreFailureClient();

Review comment:
       Maybe something like this:
   ```
     private static class MockHiveClientPool extends HiveClientPool {
       public int reconnectCalls = 0;
   
       MockHiveClientPool() {
         super(2, new HiveConf());
       }
   
       @Override
       protected HiveMetaStoreClient newClient() {
   [...]
       }
   
       @Override
       protected HiveMetaStoreClient reconnect(HiveMetaStoreClient client) {
         HiveMetaStoreClient client2 = Mockito.mock(HiveMetaStoreClient.class);
   [..]
       }
     }
   ```




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



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

Reply via email to