Fixes the issue of missing root cause in container launch TimeoutException (e.g. SSLHandshakeException)#5778
Fixes the issue of missing root cause in container launch TimeoutException (e.g. SSLHandshakeException)#5778kiview merged 9 commits intotestcontainers:mainfrom cdanger:master
Conversation
…ecially SSL connection check errors when applying a HTTPS WaitStrategy (javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target). The exception was not propagated to the ContainerLaunchException, therefore not visible in the logs / final stacktrace.
|
Thanks for the PR @cdanger, a really good addition for the DX. Could you please look into adding a test for this behavior? Maybe it is also fine to add it to the existing |
… cause of a HttpWaitStrategy failure in a ContainerLaunchException / TimeoutException, such as HTTPs check / certificate validation error): HttpWaitStrategyTest#testWaitUntilReadyWithTimeoutCausedBySslHandshakeError()
OK I added a new commit with a new test for this in the |
|
Waiting on code owner review... |
|
@cdanger Do you want to finish up this PR regarding our suggestions, or should we take care of it? |
…WaitStrategyTest.java Co-authored-by: Kevin Wittek <[email protected]>
…aceContaining("javax.net.ssl.SSLHandshakeException")` and remove all the custom code in `AbstractWaitStrategy` class.
|
@cdanger CI is failing because of spotless, can you please run |
|
Thanks @cdanger, merged 👍 |
Fixes the issue of root causes not propagated to container launch TimeoutException; e.g. when applying a HttpWaitStrategy with TLS enabled (HTTPS), if HTTPS connection check fails because of certificate validation issue (e.g.
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target), this exception is not propagated, therefor missing from the logs and the TimeoutException thrown at the end. The only wait to know about it is by using a debugger. The fix just adds the causing exception to the ContainerLaunchException, so that it's part of the TimeoutException stacktrace later on.