pvary commented on a change in pull request #2119:
URL: https://github.com/apache/iceberg/pull/2119#discussion_r570253524
##########
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:
Even better, we do not have to create a new class for the tests, but we
can use `Mockito.spy()` on `HiveClientPool` and return the different clients on
`newClient` and `reconnect`
----------------------------------------------------------------
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]