My java code is communicating with a middleware and printing the result in another screen.I’ve used connectionTimeoutEcxeption to handle any connection issues and socketTimeoutException to handle read timeout Exception both of these exceptions are handled separately.
I need to make sure that if the middleware is down the exception should be caught by connectionTimeoutException. How do i test this?
I’ve tried by giving connection timeout as min value as possible but this doesnt quite do the job i cant turn down the middleware myself.
yousef rizvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.