You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Enrico Olivelli (JIRA)" <ji...@apache.org> on 2018/08/31 21:37:00 UTC

[jira] [Created] (ZOOKEEPER-3136) Reduce log in FourLetterWordMain in case of "ConnectException"

Enrico Olivelli created ZOOKEEPER-3136:
------------------------------------------

             Summary: Reduce log in FourLetterWordMain in case of "ConnectException"
                 Key: ZOOKEEPER-3136
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3136
             Project: ZooKeeper
          Issue Type: Task
          Components: tests
            Reporter: Enrico Olivelli
            Assignee: Enrico Olivelli


While running tests you will always see spammy log lines like the ones below.

As we are expecting the server to be up, it is not useful to log such stacktraces.

The patch simply reduce the log in this specific case, because it adds no value and it is very annoying.

 
{code:java}
     [junit] 2018-08-31 23:31:49,173 [myid:] - INFO  [main:ClientBase@292] - server 127.0.0.1:11222 not up
    [junit] java.net.ConnectException: Connection refused (Connection refused)
    [junit]     at java.net.PlainSocketImpl.socketConnect(Native Method)
    [junit]     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    [junit]     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    [junit]     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    [junit]     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    [junit]     at java.net.Socket.connect(Socket.java:589)
    [junit]     at org.apache.zookeeper.client.FourLetterWordMain.send4LetterWord(FourLetterWordMain.java:101)
    [junit]     at org.apache.zookeeper.client.FourLetterWordMain.send4LetterWord(FourLetterWordMain.java:71)
    [junit]     at org.apache.zookeeper.test.ClientBase.waitForServerUp(ClientBase.java:285)
    [junit]     at org.apache.zookeeper.test.ClientBase.waitForServerUp(ClientBase.java:276)
{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)