aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

Best practices for testing retries #100

Closed Aloren closed 6 years ago

Aloren commented 6 years ago

For testing purposes we setup Aerospike in Docker. We would like to test whether our timeouts and retries are setup properly. Maybe there is a special test mode in Aerospike for returning specific error codes on client? Or is there another way of testing retries on client? (We are using not only built-in retry support in aerospike-client, we have spring-retry for retrying specific codes) In Couchbase we have the following things: Delay response Fail with specific error code

BrianNichols commented 6 years ago

There is no automated testing facility for testing retries or error codes. Those features were tested manually by inducing sleep/error codes into the server source code and running clients against that server.

Aloren commented 6 years ago

Would you consider this issue as a feature request? We can not test such things manually -- it will take a lot of time and effort to do that for dozens of services...

BrianNichols commented 6 years ago

I have created an enhancement request for the server team. It's just a request, so there is no implication about if/when this request is implemented.

In the meantime, socket delays can be implemented using linux traffic control:

https://netbeez.net/blog/how-to-use-the-linux-traffic-control/

Aloren commented 6 years ago

Thank you. This is a nice tool. I will add this workaround into our testing container.