Reputation: 20200
We would like our platform code to automatically adjust all timeouts to infinite if we are in debug mode so timeouts don't happen. Is there a way to ask java "Am I in debug mode?"
thanks, Dean
Upvotes: 0
Views: 55
Reputation: 5207
The link in the comment may be fine in many cases.
But sometimes it may be needed to debug the application behaviour after timeout occurred. For instance, to understand why the retry logic (that is executed only after timeout) doesn't work as expected.
On the development environment the application might be running all the time in debug mode with the goal to be ready for remote debugging at any time, without restarting the application.
That's why I'd suggest to define timeouts via another properties file or via system properties.
Upvotes: 2