Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Simulate Elastic Server Failure #28

Closed
disfluxly opened this issue Dec 20, 2019 · 1 comment
Closed

FR: Simulate Elastic Server Failure #28

disfluxly opened this issue Dec 20, 2019 · 1 comment

Comments

@disfluxly
Copy link

A suggested Feature Request:

For APIs that use Elastic on the backend, the clients are often instantiated early on. It would be nice to simulate the instantiation of the client as successful, but subsequent calls receiving server errors from Elastic.

Basic example test:

def test_api_elastic_down(self):
	res = self.client().post('/', json=test_data)

	self.assertEqual(res.status_code, 500)

In the above test, es = Elasticsearch(hosts=es_hosts) would have been instantiated early on, possibly when the app first started.

This would be nice for workflows where, if Elastic is down, the developer wants to send the data to a Queueing system for processing once Elastic is back up.

@vrcmarcos
Copy link
Owner

Done on version 1.4.0. See README for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants