saxenapranav commented on code in PR #6633:
URL: https://github.com/apache/hadoop/pull/6633#discussion_r1670238068


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestApacheClientConnectionPool.java:
##########
@@ -76,14 +77,46 @@ public void testPoolWithZeroSysProp() throws Exception {
   @Test
   public void testEmptySizePool() throws Exception {
     Configuration configuration = new Configuration();
-    configuration.set(FS_AZURE_APACHE_HTTP_CLIENT_MAX_CACHE_CONNECTION_SIZE, 
"0");
-    AbfsConfiguration abfsConfiguration = new AbfsConfiguration(configuration, 
EMPTY_STRING);
-    try (KeepAliveCache keepAliveCache = new 
KeepAliveCache(abfsConfiguration)) {
-      
Assertions.assertThat(keepAliveCache.put(Mockito.mock(HttpClientConnection.class))).isFalse();
-      Assertions.assertThat(keepAliveCache.get()).isNull();
+    configuration.set(FS_AZURE_APACHE_HTTP_CLIENT_MAX_CACHE_CONNECTION_SIZE,
+        "0");
+    AbfsConfiguration abfsConfiguration = new AbfsConfiguration(configuration,
+        EMPTY_STRING);
+    try (KeepAliveCache keepAliveCache = new KeepAliveCache(
+        abfsConfiguration)) {
+      assertCachePutFail(keepAliveCache,
+          Mockito.mock(HttpClientConnection.class));
+      assertCacheGetNull(keepAliveCache);
     }
   }
 
+  private void assertCacheGetNull(final KeepAliveCache keepAliveCache)

Review Comment:
   Makes sense. Have rename to `assertCacheGetIsNul`l and 
`assertCacheGetIsNonNull`



##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestApacheClientConnectionPool.java:
##########
@@ -76,14 +77,46 @@ public void testPoolWithZeroSysProp() throws Exception {
   @Test
   public void testEmptySizePool() throws Exception {
     Configuration configuration = new Configuration();
-    configuration.set(FS_AZURE_APACHE_HTTP_CLIENT_MAX_CACHE_CONNECTION_SIZE, 
"0");
-    AbfsConfiguration abfsConfiguration = new AbfsConfiguration(configuration, 
EMPTY_STRING);
-    try (KeepAliveCache keepAliveCache = new 
KeepAliveCache(abfsConfiguration)) {
-      
Assertions.assertThat(keepAliveCache.put(Mockito.mock(HttpClientConnection.class))).isFalse();
-      Assertions.assertThat(keepAliveCache.get()).isNull();
+    configuration.set(FS_AZURE_APACHE_HTTP_CLIENT_MAX_CACHE_CONNECTION_SIZE,
+        "0");
+    AbfsConfiguration abfsConfiguration = new AbfsConfiguration(configuration,
+        EMPTY_STRING);
+    try (KeepAliveCache keepAliveCache = new KeepAliveCache(
+        abfsConfiguration)) {
+      assertCachePutFail(keepAliveCache,
+          Mockito.mock(HttpClientConnection.class));
+      assertCacheGetNull(keepAliveCache);
     }
   }
 
+  private void assertCacheGetNull(final KeepAliveCache keepAliveCache)

Review Comment:
   Makes sense. Have renamed to `assertCacheGetIsNul`l and 
`assertCacheGetIsNonNull`



-- 
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: [email protected]

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