Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cleaner method for creating HttpClient in test #1615

Open
johnrengelman opened this issue Oct 11, 2021 · 0 comments
Open

Added cleaner method for creating HttpClient in test #1615

johnrengelman opened this issue Oct 11, 2021 · 0 comments

Comments

@johnrengelman
Copy link
Member

Some test cases for services or handlers require construction of a HttpClient instance that is normally injected by the server registry in a running application.
These tests would often utilize the HttpClient.of {} initialization the test case to create the instance.
As a result of #1581 and introducing the Netty based DNS resolver, this no longer works without either:

  1. Explicitly wiring in an ExecController instance: HttpClient.of { it.execController(execController)}
  2. Explicitly setting HttpClient.of { it.useJdkAddressResolver() }

A little additional syntax that creates an HttpClient with the JDK resolver (blocking) for test uses (which is almost always acceptabled) could help users in the migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant