[
https://issues.apache.org/jira/browse/HADOOP-19609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18014483#comment-18014483
]
ASF GitHub Bot commented on HADOOP-19609:
-----------------------------------------
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
> ABFS: Apache Client Connection Pool Relook
> ------------------------------------------
>
> Key: HADOOP-19609
> URL: https://issues.apache.org/jira/browse/HADOOP-19609
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Affects Versions: 3.4.1
> Reporter: Manish Bhatt
> Assignee: Manish Bhatt
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]