How to set the timeout for socket when looking for host?

后端 未结 1 1452
抹茶落季
抹茶落季 2020-12-17 03:55

In my unit test, I use commons httpclient to request a incorrect remote web site, and the max timeout is:

@Test(timeout = 10000)
public void should_not_be_ac         


        
相关标签:
1条回答
  • 2020-12-17 04:51

    You can control Java's DNS timeouts via the timeout properties described here:

    com.example.jndi.dns.timeout.initial
    com.example.jndi.dns.timeout.retries
    
    0 讨论(0)
提交回复
热议问题