File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
tests/internal/service_name Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,16 @@ def test_config_extra_service_names_fork(run_python_code_in_subprocess):
2020 pid = os.fork()
2121 if pid == 0:
2222 # Child process
23- ddtrace.config._add_extra_service(f"extra_service_{i}")
24- time.sleep(0.1) # Ensure the child has time to save the service
23+ service_name = f"extra_service_{i}"
24+ ddtrace.config._add_extra_service(service_name)
25+ # Ensure the child has time to save the service
26+ for _ in range(30):
27+ time.sleep(0.1)
28+ if service_name in set(ddtrace.config._extra_services_queue.peekall()):
29+ break
30+ else:
31+ msg = f"extra service name '{service_name}' not emitted by child"
32+ raise RuntimeError(msg)
2533 sys.exit(0)
2634 else:
2735 # Parent process
You can’t perform that action at this time.
0 commit comments