Skip to content

Commit 15c46fb

Browse files
wip: fixing tests
1 parent 9d28979 commit 15c46fb

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tests/profiling/collector/test_asyncio.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ def teardown_method(self):
9999
async def test_lock_events(self):
100100
"""Test basic acquire/release event profiling."""
101101
with self.collector_class(capture_pct=100):
102-
lock = self.create_lock() # !CREATE! test_lock_events
103-
await lock.acquire() # !ACQUIRE! test_lock_events
102+
lock = self.create_lock() # !CREATE! asyncio_test_lock_events
103+
await lock.acquire() # !ACQUIRE! asyncio_test_lock_events
104104
assert lock.locked()
105-
lock.release() # !RELEASE! test_lock_events
105+
lock.release() # !RELEASE! asyncio_test_lock_events
106106

107107
ddup.upload()
108108

109-
linenos = get_lock_linenos("test_lock_events")
109+
linenos = get_lock_linenos("asyncio_test_lock_events")
110110
profile = pprof_utils.parse_newest_profile(self.output_filename)
111111
expected_thread_id = _thread.get_ident()
112112
pprof_utils.assert_lock_events(
@@ -138,23 +138,23 @@ async def test_lock_events_tracer(self, tracer):
138138
span_type = ext.SpanTypes.WEB
139139

140140
with self.collector_class(capture_pct=100, tracer=tracer):
141-
lock = self.create_lock() # !CREATE! test_lock_events_tracer_1
142-
await lock.acquire() # !ACQUIRE! test_lock_events_tracer_1
141+
lock = self.create_lock() # !CREATE! asyncio_test_lock_events_tracer_1
142+
await lock.acquire() # !ACQUIRE! asyncio_test_lock_events_tracer_1
143143
with tracer.trace("test", resource=resource, span_type=span_type) as t:
144-
lock2 = self.create_lock() # !CREATE! test_lock_events_tracer_2
145-
await lock2.acquire() # !ACQUIRE! test_lock_events_tracer_2
146-
lock.release() # !RELEASE! test_lock_events_tracer_1
144+
lock2 = self.create_lock() # !CREATE! asyncio_test_lock_events_tracer_2
145+
await lock2.acquire() # !ACQUIRE! asyncio_test_lock_events_tracer_2
146+
lock.release() # !RELEASE! asyncio_test_lock_events_tracer_1
147147
span_id = t.span_id
148-
lock2.release() # !RELEASE! test_lock_events_tracer_2
148+
lock2.release() # !RELEASE! asyncio_test_lock_events_tracer_2
149149

150-
lock_ctx = self.create_lock() # !CREATE! test_lock_events_tracer_3
151-
async with lock_ctx: # !ACQUIRE! !RELEASE! test_lock_events_tracer_3
150+
lock_ctx = self.create_lock() # !CREATE! asyncio_test_lock_events_tracer_3
151+
async with lock_ctx: # !ACQUIRE! !RELEASE! asyncio_test_lock_events_tracer_3
152152
pass
153153
ddup.upload(tracer=tracer)
154154

155-
linenos_1 = get_lock_linenos("test_lock_events_tracer_1")
156-
linenos_2 = get_lock_linenos("test_lock_events_tracer_2")
157-
linenos_3 = get_lock_linenos("test_lock_events_tracer_3", with_stmt=True)
155+
linenos_1 = get_lock_linenos("asyncio_test_lock_events_tracer_1")
156+
linenos_2 = get_lock_linenos("asyncio_test_lock_events_tracer_2")
157+
linenos_3 = get_lock_linenos("asyncio_test_lock_events_tracer_3", with_stmt=True)
158158

159159
profile = pprof_utils.parse_newest_profile(self.output_filename)
160160
expected_thread_id = _thread.get_ident()

0 commit comments

Comments
 (0)