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
12 changes: 10 additions & 2 deletions tests/internal/service_name/test_extra_services_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@ def test_config_extra_service_names_fork(run_python_code_in_subprocess):
pid = os.fork()
if pid == 0:
# Child process
ddtrace.config._add_extra_service(f"extra_service_{i}")
time.sleep(0.1) # Ensure the child has time to save the service
service_name = f"extra_service_{i}"
ddtrace.config._add_extra_service(service_name)
# Ensure the child has time to save the service
for _ in range(30):
time.sleep(0.1)
if service_name in set(ddtrace.config._extra_services_queue.peekall()):
break
else:
msg = f"extra service name '{service_name}' not emitted by child"
raise RuntimeError(msg)
sys.exit(0)
else:
# Parent process
Expand Down
Loading