manika137 commented on code in PR #7817:
URL: https://github.com/apache/hadoop/pull/7817#discussion_r2281204554


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestApacheClientConnectionPool.java:
##########
@@ -49,46 +45,50 @@ public TestApacheClientConnectionPool() throws Exception {
     super();
   }
 
-  @Override
-  protected int getTestTimeoutMillis() {
-    return (int) DEFAULT_HTTP_CLIENT_CONN_MAX_IDLE_TIME * 4;
-  }
-
   @Test
-  public void testBasicPool() throws Exception {
-    System.clearProperty(HTTP_MAX_CONN_SYS_PROP);
-    validatePoolSize(DEFAULT_HTTP_CLIENT_CONN_MAX_CACHED_CONNECTIONS);
-  }
-
-  @Test
-  public void testSysPropAppliedPool() throws Exception {
-    final String customPoolSize = "10";
-    System.setProperty(HTTP_MAX_CONN_SYS_PROP, customPoolSize);
-    validatePoolSize(Integer.parseInt(customPoolSize));
-  }
+  public void testPoolSizeWithNotConfigured() throws Exception {
+    Configuration configuration = new Configuration();
+    configuration.unset(FS_AZURE_APACHE_HTTP_CLIENT_MAX_CACHE_CONNECTION_SIZE);
+    AbfsConfiguration abfsConfiguration = new AbfsConfiguration(configuration,
+        EMPTY_STRING);
+    try (KeepAliveCache keepAliveCache = new KeepAliveCache(
+        abfsConfiguration)) {
+      Assertions.assertThat(keepAliveCache.getMaxCacheConnections())
+          .describedAs("In case configured cache size is 0, "
+              + "the pool size should be minimum possible value")
+          .isEqualTo(DEFAULT_HTTP_CLIENT_CONN_MAX_CACHED_CONNECTIONS);

Review Comment:
   Need to change the assert statement to picking up the default value if 
connection config is not set



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

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


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

Reply via email to