0

I have Service Endpoint Implementation, and I want to simulate timeout scenarios for testing purposes. The implementation method handles the request. How do I "ignore" the request from within the method, showing up as a timeout for the calling service?

Tuomas Toivonen
  • 18,478
  • 39
  • 108
  • 200
  • mock the method with timeout? – user7294900 May 17 '18 at 12:50
  • Are your familiar with Junit? Refer https://stackoverflow.com/questions/14970516/use-mockito-to-mock-some-methods-but-not-others – Shubham Kadlag May 17 '18 at 12:56
  • You get the question wrong. I'm doing end-to-end testing where the system components are actually called, and have to simulate the network failure from one system component. Basically, when the service receives a request, it should check if the failure simulation is on and silently ignore the request, resulting in a timeout on the callers end. – Tuomas Toivonen May 17 '18 at 16:15

0 Answers0