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


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/KeepAliveCache.java:
##########
@@ -96,6 +97,8 @@ class KeepAliveCache extends 
Stack<KeepAliveCache.KeepAliveEntry>
    */
   private final AtomicBoolean isPaused = new AtomicBoolean(false);
 
+  private final String accountNamePath;

Review Comment:
   add javadoc to say this is only used for exception messages.



##########
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:
   can you use isNull and isNotNull to make clearer when reading what is being 
asserted?



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