algolia / algoliasearch-client-java

⚡️ A fully-featured and blazing-fast Java API client to interact with Algolia.
https://www.algolia.com/doc/api-client/getting-started/install/java/
MIT License
46 stars 33 forks source link

Implement retry until success for restore_api_key() call in CTS test #713

Closed aseure closed 4 years ago

aseure commented 4 years ago

Because of the way Algolia is designed, performing a restoreApiKey may not succeed because the previous deleteApiKey takes some time to get propagated to all Algolia servers, giving us the following response: [404] Key already exists.

To prevent that, we need to change the testApiKeys CTS test, if implemented, to retry even on [404] Key already exists response.