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


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/ITestApacheClientConnectionPool.java:
##########
@@ -60,4 +74,36 @@ public void testKacIsClosed() throws Throwable {
       verifyCause(ClosedIOException.class, ex);
     }
   }
+
+  @Test
+  public void testConnectionLogging() throws Exception {
+    HttpHost host = new HttpHost(getFileSystem().getUri().getHost(),
+        getFileSystem().getUri().getPort(),
+        HTTPS_SCHEME);
+    HttpRoute httpRoute = new HttpRoute(host);
+
+    AbfsManagedApacheHttpConnection conn
+        = (AbfsManagedApacheHttpConnection) new 
AbfsHttpClientConnectionFactory().create(
+        httpRoute, null);
+    String log = conn.toString();
+    Assertions.assertThat(log.split(COLON).length)
+        .describedAs("Log to have three field: https://host:port:hashCode";)

Review Comment:
   nit: "fields"



##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/ITestApacheClientConnectionPool.java:
##########
@@ -60,4 +74,36 @@ public void testKacIsClosed() throws Throwable {
       verifyCause(ClosedIOException.class, ex);
     }
   }
+
+  @Test
+  public void testConnectionLogging() throws Exception {

Review Comment:
   I'd like this split into two test cases, for better isolation. You could 
factor out the common stuff with the connection creation being the only 
difference
   * httpRouteConnection
   * validation of the connection



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