File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 17
17
18
18
import os
19
19
from unittest import mock
20
- from elasticsearch import Elasticsearch
21
- from elasticsearch import helpers
20
+
22
21
import pytest
23
22
23
+ from elasticsearch import Elasticsearch , helpers
24
+
24
25
try :
25
26
from opentelemetry .sdk .trace import TracerProvider , export
26
27
from opentelemetry .sdk .trace .export .in_memory_span_exporter import (
@@ -111,8 +112,6 @@ def test_forward_otel_context_to_subthreads(
111
112
112
113
_call_bulk_mock .return_value = mock .Mock ()
113
114
actions = ({"x" : i } for i in range (100 ))
114
- list (
115
- helpers .parallel_bulk (es_client , actions , chunk_size = 4 )
116
- )
115
+ list (helpers .parallel_bulk (es_client , actions , chunk_size = 4 ))
117
116
# Ensures that the OTEL context has been forwarded to all chunks
118
117
assert es_client ._otel .recover_parent_context .call_count == 25
You can’t perform that action at this time.
0 commit comments