Skip to content

Commit bd82b8f

Browse files
committed
Undo changes in shim
1 parent 27254e5 commit bd82b8f

17 files changed

Lines changed: 17 additions & 272 deletions

File tree

shim/opentelemetry-opentracing-shim/tests/testbed/test_active_span_replacement/test_asyncio.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
import asyncio
162

17-
# pylint: disable=import-error
183
from ..otel_ot_shim_tracer import MockTracer
194
from ..testcase import OpenTelemetryTestCase
205
from ..utils import stop_loop_when
216

227

238
class TestAsyncio(OpenTelemetryTestCase):
24-
def setUp(self): # pylint: disable=invalid-name
9+
def setUp(self):
2510
self.tracer = MockTracer()
2611
self.loop = asyncio.get_event_loop()
2712

shim/opentelemetry-opentracing-shim/tests/testbed/test_active_span_replacement/test_threads.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
from concurrent.futures import ThreadPoolExecutor
162

17-
# pylint: disable=import-error
183
from ..otel_ot_shim_tracer import MockTracer
194
from ..testcase import OpenTelemetryTestCase
205

216

227
class TestThreads(OpenTelemetryTestCase):
23-
def setUp(self): # pylint: disable=invalid-name
8+
def setUp(self):
249
self.tracer = MockTracer()
2510
# use max_workers=3 as a general example even if only one would suffice
2611
self.executor = ThreadPoolExecutor(max_workers=3)

shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_asyncio.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
import asyncio
162

173
import opentracing
184
from opentracing.ext import tags
195

20-
# pylint: disable=import-error
216
from ..otel_ot_shim_tracer import MockTracer
227
from ..testcase import OpenTelemetryTestCase
238
from ..utils import get_logger, get_one_by_tag, stop_loop_when
@@ -65,7 +50,7 @@ async def send(self):
6550

6651

6752
class TestAsyncio(OpenTelemetryTestCase):
68-
def setUp(self): # pylint: disable=invalid-name
53+
def setUp(self):
6954
self.tracer = MockTracer()
7055
self.queue = asyncio.Queue()
7156
self.loop = asyncio.get_event_loop()

shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_threads.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,9 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
from queue import Queue
162
from threading import Thread
173

184
import opentracing
195
from opentracing.ext import tags
206

21-
# pylint: disable=import-error
227
from ..otel_ot_shim_tracer import MockTracer
238
from ..testcase import OpenTelemetryTestCase
249
from ..utils import await_until, get_logger, get_one_by_tag
@@ -67,7 +52,7 @@ def send(self):
6752

6853

6954
class TestThreads(OpenTelemetryTestCase):
70-
def setUp(self): # pylint: disable=invalid-name
55+
def setUp(self):
7156
self.tracer = MockTracer()
7257
self.queue = Queue()
7358
self.server = Server(tracer=self.tracer, queue=self.queue)

shim/opentelemetry-opentracing-shim/tests/testbed/test_common_request_handler/request_handler.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
from opentracing.ext import tags
162

17-
# pylint: disable=import-error
183
from ..utils import get_logger
194

205
logger = get_logger(__name__)

shim/opentelemetry-opentracing-shim/tests/testbed/test_common_request_handler/test_asyncio.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
import asyncio
162

173
from opentracing.ext import tags
184

19-
# pylint: disable=import-error
205
from ..otel_ot_shim_tracer import MockTracer
216
from ..testcase import OpenTelemetryTestCase
227
from ..utils import get_logger, get_one_by_operation_name, stop_loop_when
@@ -60,7 +45,7 @@ class TestAsyncio(OpenTelemetryTestCase):
6045
So one issue here is setting correct parent span.
6146
"""
6247

63-
def setUp(self): # pylint: disable=invalid-name
48+
def setUp(self):
6449
self.tracer = MockTracer()
6550
self.loop = asyncio.get_event_loop()
6651
self.client = Client(RequestHandler(self.tracer), self.loop)

shim/opentelemetry-opentracing-shim/tests/testbed/test_common_request_handler/test_threads.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
from concurrent.futures import ThreadPoolExecutor
162

173
from opentracing.ext import tags
184

19-
# pylint: disable=import-error
205
from ..otel_ot_shim_tracer import MockTracer
216
from ..testcase import OpenTelemetryTestCase
227
from ..utils import get_logger, get_one_by_operation_name
@@ -60,7 +45,7 @@ class TestThreads(OpenTelemetryTestCase):
6045
activate span. So one issue here is setting correct parent span.
6146
"""
6247

63-
def setUp(self): # pylint: disable=invalid-name
48+
def setUp(self):
6449
self.tracer = MockTracer()
6550
self.executor = ThreadPoolExecutor(max_workers=3)
6651
self.client = Client(RequestHandler(self.tracer), self.executor)

shim/opentelemetry-opentracing-shim/tests/testbed/test_late_span_finish/test_asyncio.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
import asyncio
162

17-
# pylint: disable=import-error
183
from ..otel_ot_shim_tracer import MockTracer
194
from ..testcase import OpenTelemetryTestCase
205
from ..utils import get_logger, stop_loop_when
@@ -23,7 +8,7 @@
238

249

2510
class TestAsyncio(OpenTelemetryTestCase):
26-
def setUp(self): # pylint: disable=invalid-name
11+
def setUp(self):
2712
self.tracer = MockTracer()
2813
self.loop = asyncio.get_event_loop()
2914

shim/opentelemetry-opentracing-shim/tests/testbed/test_late_span_finish/test_threads.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
import time
162
from concurrent.futures import ThreadPoolExecutor
173

18-
# pylint: disable=import-error
194
from ..otel_ot_shim_tracer import MockTracer
205
from ..testcase import OpenTelemetryTestCase
216

227

238
class TestThreads(OpenTelemetryTestCase):
24-
def setUp(self): # pylint: disable=invalid-name
9+
def setUp(self):
2510
self.tracer = MockTracer()
2611
self.executor = ThreadPoolExecutor(max_workers=3)
2712

shim/opentelemetry-opentracing-shim/tests/testbed/test_listener_per_request/test_asyncio.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
import asyncio
162

173
from opentracing.ext import tags
184

19-
# pylint: disable=import-error
205
from ..otel_ot_shim_tracer import MockTracer
216
from ..testcase import OpenTelemetryTestCase
227
from ..utils import get_one_by_tag
@@ -43,7 +28,7 @@ def send_sync(self, message):
4328

4429

4530
class TestAsyncio(OpenTelemetryTestCase):
46-
def setUp(self): # pylint: disable=invalid-name
31+
def setUp(self):
4732
self.tracer = MockTracer()
4833
self.loop = asyncio.get_event_loop()
4934

0 commit comments

Comments
 (0)