Conversation
| import java.net.Socket; | ||
| import java.net.SocketTimeoutException; | ||
| import java.net.URL; | ||
| import java.security.Security; |
There was a problem hiding this comment.
I can't see a change that requires this to be imported.
There was a problem hiding this comment.
I changed IDEs and import cleanup must now be turned off :(
|
+1 |
|
@willholley are you happy with the log messages:
and
? |
|
@ricellis the error messages look fine. Ideally we shouldn't need to prescribe a value (though 30 seconds is probably a good one) and the client should respect the DNS TTL that we return (e.g. see http://mxtoolbox.com/SuperTool.aspx?action=a%3awillholley.cloudant.com&run=toolpage). From what I can tell, this varies between DNS entries - sometimes it's 30 seconds and sometimes up to 5 minutes. |
|
Thanks, this is logging only as we can't change the behaviour of the JVM - so 30 s is the barrier chosen for the message. |
Added warning level log messages if the TTL is too high or can't be checked. Added tests to validate log output: dnsNoWarningLessThan30 dnsNoWarning0 dnsWarningForever dnsNoWarning30 dnsWarning31 dnsWarningPermissionDenied dnsWarningDefaultWithSecurityManager Updated CHANGES.md
ff73d2e to
c6ab90a
Compare
What
Added log warnings for long JVM DNS cache TTLs.
How
Added warning level log messages if the TTL is too high or can't be checked.
SecurityManageris active then log a warning because the TTL is infinite if unconfigured with aSecurityManager.Testing
Added tests to validate log output:
dnsNoWarningLessThan30
dnsNoWarning0
dnsWarningForever
dnsNoWarning30
dnsWarning31
dnsWarningPermissionDenied
dnsWarningDefaultWithSecurityManager
Issues
Fixes #270