-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Provide a property that configures webclient/webtestclients default timeout globally #34711
Comments
See also #31496 |
We're not totally sure that a property is the best solution, but it would be really nice if we could offer a better way to programmatically change the timeout for an individual |
To be honest Phil, I think global would be convenient for WebClient , at least during test, since when debugging (at least webclient's non-reactive) communications, it's very annoying to get java.lang.IllegalStateException: Timeout on blocking read for X NANOSECONDS, every then and now. I'm not exactly sure of the internal mechanics of flux timings (maybe it's my fault on conceptual design), but I assume it's a matter of the lazy/future-evaluations chain because I never suffer them with servlet arch. But just my 2c as a heavy user |
If this goes on, there is another property that would benefit from this, logging: https://stackoverflow.com/questions/46154994/how-to-log-spring-5-webclient-call |
@philwebb any news about this one? I was, internally, asked how to configure timeouts for the new My current solution is a Especially, reusing this logic was only possible because I looked into the source code of the autoconfiguration. |
@mvitz There's no update on this one yet I'm afraid |
@philwebb Thanks for your quick reply. I understand that this case is special because configuring a builder via properties is not that common but on the other hand being able to easily configure things like timeouts would be useful, too. I was thinking if something like Let me know if theres anything I can do to help/support. |
Is there anything I can do to help? This is a feature that would be super useful for us. |
I think,
WebClient
/WebTestClient(Builder)
should be able to configure defaults through properties, especially timeout and especially forWebTestClient
, since its a setup most people would tune in order to being able to debug for long time and not get a connection exception.Kind of
@AutoConfigureWebTestClient(timeout = "10000")
, but through properties on a global scope.My apologies if such a setup exists, I could not find it in issues nor spring-boot-properties docs
The text was updated successfully, but these errors were encountered: