There was an error while loading. Please reload this page.
1 parent 22943e7 commit 7729c30Copy full SHA for 7729c30
test_elasticsearch/test_helpers.py
@@ -18,7 +18,7 @@ def test_all_chunks_sent(self, _process_bulk_chunk):
18
@mock.patch(
19
'elasticsearch.helpers._process_bulk_chunk',
20
# make sure we spend some time in the thread
21
- side_effect=lambda *a: [(True, time.sleep(.001) or threading.get_ident())]
+ side_effect=lambda *a: [(True, time.sleep(.001) or threading.current_thread().ident)]
22
)
23
def test_chunk_sent_from_different_threads(self, _process_bulk_chunk):
24
actions = ({'x': i} for i in range(100))
0 commit comments