elasticsearch-py
elasticsearch-py copied to clipboard
tests for parallel bulk rely on Mock.call_count which is not thread safe
We need to change the logic used to checking the calls made to something that can be incremented atomically like appending to a list or something.
i wrote a test(pytest) for my elasticsearch project, when i run it, this error raise RequestError(400, 'index_closed_exception', 'closed') but, when run as debug and run step by step it's ok ...
can this prove elasticsearch is not threading safe?
@mosi-kha Elasticsearch is thread safe, it is mock which is not and it only affects this one test. What you are seeing is unrelated.