You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
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.
The text was updated successfully, but these errors were encountered: