You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue when making an HTTP request in the cleanupSpec() function of a Spock test. The same HTTP GET request works perfectly in both the test case and the cleanup() function, but when it's called from cleanupSpec(). I expected the HTTP client to remain active until cleanupSpec() is successfully executed.
Instead of successfully executing HTTP request, I'm getting the following error: Connect Error: Cannot send HTTPS request. SSL is disabled io.micronaut.http.client.exceptions.HttpClientException: Connect Error: Cannot send HTTPS request. SSL is disabled
Detail error message: Connect Error: Cannot send HTTPS request. SSL is disabled io.micronaut.http.client.exceptions.HttpClientException: Connect Error: Cannot send HTTPS request. SSL is disabled at app//io.micronaut.http.client.netty.ConnectionManager$Pool.onNewConnectionFailure(ConnectionManager.java:986) at app//io.micronaut.http.client.netty.PoolResizer.doSomeWork(PoolResizer.java:157) at app//io.micronaut.http.client.netty.PoolResizer.dirty(PoolResizer.java:77) at app//io.micronaut.http.client.netty.PoolResizer.addPendingRequest(PoolResizer.java:233) at app//io.micronaut.http.client.netty.ConnectionManager$Pool.acquire(ConnectionManager.java:965) at app//io.micronaut.http.client.netty.ConnectionManager.connect(ConnectionManager.java:430) at app//io.micronaut.http.client.netty.DefaultHttpClient.exchangeImpl(DefaultHttpClient.java:1113) at app//io.micronaut.http.client.netty.DefaultHttpClient.lambda$exchange$8(DefaultHttpClient.java:811) at app//reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:152) at app//reactor.core.publisher.FluxSwitchMapNoPrefetch.subscribeOrReturn(FluxSwitchMapNoPrefetch.java:61) at app//reactor.core.publisher.Flux.subscribe(Flux.java:8759) at app//reactor.core.publisher.Flux.blockFirst(Flux.java:2703) at app//io.micronaut.http.client.netty.DefaultHttpClient$1.exchange(DefaultHttpClient.java:547) at app//io.micronaut.http.client.BlockingHttpClient.exchange(BlockingHttpClient.java:77) at app//io.micronaut.http.client.BlockingHttpClient.exchange(BlockingHttpClient.java:106) at app//com.example.TestGetSpec.cleanupSpec(TestGETSpec.groovy:34)
Temporary Solution
Manually creating the HttpClient and managing its lifecycle, but it slows down our system. Therefore, we are looking for a permanent solution to this issue.
Steps To Reproduce
Just run this sample micronaut test class:
`@MicronautTest
class TestGetSpec extends Specification {
Expected Behavior
I'm encountering an issue when making an HTTP request in the cleanupSpec() function of a Spock test. The same HTTP GET request works perfectly in both the test case and the cleanup() function, but when it's called from cleanupSpec(). I expected the HTTP client to remain active until cleanupSpec() is successfully executed.
I also posted this question on StackOverflow earlier. Here is the link: https://stackoverflow.com/questions/78897561/http-connection-error-in-cleanupspec-function-in-spock-ssl-is-disabled.
Actual Behaviour
Instead of successfully executing HTTP request, I'm getting the following error:
Connect Error: Cannot send HTTPS request. SSL is disabled io.micronaut.http.client.exceptions.HttpClientException: Connect Error: Cannot send HTTPS request. SSL is disabled
Detail error message:
Connect Error: Cannot send HTTPS request. SSL is disabled io.micronaut.http.client.exceptions.HttpClientException: Connect Error: Cannot send HTTPS request. SSL is disabled at app//io.micronaut.http.client.netty.ConnectionManager$Pool.onNewConnectionFailure(ConnectionManager.java:986) at app//io.micronaut.http.client.netty.PoolResizer.doSomeWork(PoolResizer.java:157) at app//io.micronaut.http.client.netty.PoolResizer.dirty(PoolResizer.java:77) at app//io.micronaut.http.client.netty.PoolResizer.addPendingRequest(PoolResizer.java:233) at app//io.micronaut.http.client.netty.ConnectionManager$Pool.acquire(ConnectionManager.java:965) at app//io.micronaut.http.client.netty.ConnectionManager.connect(ConnectionManager.java:430) at app//io.micronaut.http.client.netty.DefaultHttpClient.exchangeImpl(DefaultHttpClient.java:1113) at app//io.micronaut.http.client.netty.DefaultHttpClient.lambda$exchange$8(DefaultHttpClient.java:811) at app//reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:152) at app//reactor.core.publisher.FluxSwitchMapNoPrefetch.subscribeOrReturn(FluxSwitchMapNoPrefetch.java:61) at app//reactor.core.publisher.Flux.subscribe(Flux.java:8759) at app//reactor.core.publisher.Flux.blockFirst(Flux.java:2703) at app//io.micronaut.http.client.netty.DefaultHttpClient$1.exchange(DefaultHttpClient.java:547) at app//io.micronaut.http.client.BlockingHttpClient.exchange(BlockingHttpClient.java:77) at app//io.micronaut.http.client.BlockingHttpClient.exchange(BlockingHttpClient.java:106) at app//com.example.TestGetSpec.cleanupSpec(TestGETSpec.groovy:34)
Temporary Solution
Manually creating the HttpClient and managing its lifecycle, but it slows down our system. Therefore, we are looking for a permanent solution to this issue.
Steps To Reproduce
Just run this sample micronaut test class:
`@MicronautTest
class TestGetSpec extends Specification {
}`
Environment Information
No response
Example Application
https://github.com/ratnahalder/micronaut_test
Version
3.7.2
The text was updated successfully, but these errors were encountered: