https://linen.dev logo
#general
Title
# general
r

Roman Brühlmann

02/13/2023, 10:07 AM
Hello How can I configure Wiremock to disable pooling HTTP connections in my tests? I'm using the
@AutoConfigureWireMock(port = 0)
annotation right now. I could add `.withHeader(HttpHeaders.CONNECTION, "close")`to every single stub, but I guess there is a better more general solution. Thank you
t

Tom

02/13/2023, 10:26 AM
Hi @Roman Brühlmann you might be better off disabling pooling in your client, since this is more directly equivalent to what you’ve been doing with the Connection header.
r

Roman Brühlmann

02/13/2023, 4:52 PM
Thank you.
Copy code
feign:
  client:
    config:
      default:
        # fix NoHttpResponseException on Jenkins <https://stackoverflow.com/questions/55624675/how-to-fix-nohttpresponseexception-when-running-wiremock-on-jenkins>
        defaultRequestHeaders:
          Connection:
            - close
in the application.yml does the trick.
👍 1
12 Views