I am writing integration test to verify that connection timeout works, but what i am observing is socket timeout is not being honored.
I have set the config to timeout in 15seconds, and I tried debugging the code, see below screenshot, I can confirm that timeout is being passed correctly to method
java.net.DualStackPlainSocketImpl#waitForConnect but I get connection refused exception at random intervals sometimes its just 2 seconds, sometimes its 20 seconds. For the testing I have configured a random URL which does not exists, I was expecting to get the exception after configured internal of 15 seconds.