alex-plekhanov commented on code in PR #11462:
URL: https://github.com/apache/ignite/pull/11462#discussion_r1709120602


##########
modules/core/src/main/java/org/apache/ignite/internal/client/thin/TcpClientChannel.java:
##########
@@ -807,7 +809,7 @@ else if (!supportedVers.contains(srvVer) ||
                 if (e instanceof IOException)
                     err = handleIOError((IOException)e);

Review Comment:
   Perhaps `handleIOError` should be fixed too. It uses `sock.toString()`, but 
sock it's a `ClientConnection` and doesn't implement `toString`.



##########
modules/clients/src/test/java/org/apache/ignite/common/NodeSslConnectionMetricTest.java:
##########
@@ -295,26 +296,32 @@ public void testClientConnector() throws Exception {
         checkSslCommunicationMetrics(reg, 1, 0, 0);
 
         // Tests untrusted certificate.
-        assertThrowsWithCause(() ->
-            startClient(clientConfiguration("client", "trustboth", 
CIPHER_SUITE, "TLSv1.2")),
+        Throwable ex = assertThrowsWithCause(() ->
+                startClient(clientConfiguration("client", "trustboth", 
CIPHER_SUITE, "TLSv1.2")),
             ClientConnectionException.class);
 
+        assertContains(log, ex.getMessage(), "127.0.0.1:10800");

Review Comment:
   Introduce constant for thin client address (127.0.0.1:10800)?



##########
modules/core/src/test/java/org/apache/ignite/client/ReliabilityTest.java:
##########
@@ -205,7 +205,9 @@ public void testSingleServerFailover() throws Exception {
             // Fail.
             dropAllThinClientConnections(Ignition.allGrids().get(0));
 
-            GridTestUtils.assertThrowsWithCause(() -> cachePut(cache, 0, 0), 
ClientConnectionException.class);
+            Throwable ex = GridTestUtils.assertThrowsWithCause(() -> 
cachePut(cache, 0, 0), ClientConnectionException.class);
+
+            GridTestUtils.assertContains(null, ex.getMessage(), 
cluster.clientAddresses().iterator().next());

Review Comment:
   `F.first(cluster.clientAddresses())`



##########
modules/core/src/main/java/org/apache/ignite/internal/client/thin/io/gridnioserver/GridNioClientConnectionMultiplexer.java:
##########
@@ -194,7 +195,7 @@ public 
GridNioClientConnectionMultiplexer(ClientConfiguration cfg) {
             return new GridNioClientConnection(ses, msgHnd, stateHnd);
         }
         catch (Exception e) {
-            throw new ClientConnectionException(e.getMessage(), e);
+            throw new ClientConnectionException(e.getMessage() + " [" + 
S.toString(InetSocketAddress.class, addr) + ']', e);

Review Comment:
   `S.toString` used here, but `InetSocketAddress.toString` in other places. 
Why? 



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

Reply via email to