Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions tests/contrib/aiohttp/test_request_safety.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,13 @@ def make_requests():
ctx = self.tracer.get_call_context()
threads = [threading.Thread(target=make_requests) for _ in range(10)]
for t in threads:
t.daemon = True
t.start()

# we should yield so that this loop can handle
# threads' requests
yield from asyncio.sleep(0.5)
for t in threads:
t.join(timeout=0.5)
# we should yield so that this loop can handle
# threads' requests
yield from asyncio.sleep(0.1)
t.join(0.1)

# the trace is wrong but the Context is finished
traces = self.tracer.writer.pop_traces()
Expand Down