Six Stars

Mock service that returns 500 for certain time

How could I create a Talend service that would return for 10 seconds 500 response and after 10 seconds it would work normally?

 

I need that for testing retry logic.

1 ACCEPTED SOLUTION

Accepted Solutions
Twelve Stars

Re: Mock service that returns 500 for certain time

I have knocked up a basic example service. It is attached. It was written using 6.2.1. You can use it to see how I did it or add to it for your testing. Essentially I am taking the time when the service starts and then checking the time every time the service is called. 

Rilhia Solutions
1 REPLY
Twelve Stars

Re: Mock service that returns 500 for certain time

I have knocked up a basic example service. It is attached. It was written using 6.2.1. You can use it to see how I did it or add to it for your testing. Essentially I am taking the time when the service starts and then checking the time every time the service is called. 

Rilhia Solutions