diff --git a/tests/ext/background-sender/agent_headers_container_id_fargate.phpt b/tests/ext/background-sender/agent_headers_container_id_fargate.phpt index fa4fccffb7e..9a6dae7a944 100644 --- a/tests/ext/background-sender/agent_headers_container_id_fargate.phpt +++ b/tests/ext/background-sender/agent_headers_container_id_fargate.phpt @@ -9,7 +9,7 @@ DD_TRACE_BGS_ENABLED=1 DD_AGENT_HOST=request-replayer DD_TRACE_AGENT_PORT=80 DD_TRACE_AGENT_FLUSH_AFTER_N_REQUESTS=1 -DD_TRACE_AGENT_FLUSH_INTERVAL=333 +DD_TRACE_AGENT_FLUSH_INTERVAL=666 DD_TRACE_GENERATE_ROOT_SPAN=0 DD_INSTRUMENTATION_TELEMETRY_ENABLED=0 --INI-- diff --git a/tests/ext/request-replayer/client_side_stats.phpt b/tests/ext/request-replayer/client_side_stats.phpt index 3e20b8a6cc4..ee448cbeabc 100644 --- a/tests/ext/request-replayer/client_side_stats.phpt +++ b/tests/ext/request-replayer/client_side_stats.phpt @@ -27,6 +27,7 @@ DD_TRACE_GENERATE_ROOT_SPAN=0 DD_INSTRUMENTATION_TELEMETRY_ENABLED=0 DD_TRACE_SIDECAR_TRACE_SENDER=1 DD_TRACE_STATS_COMPUTATION_ENABLED=1 +DD_TRACE_LOG_LEVEL=off --INI-- datadog.env=test-env datadog.version=1.2.3-basic diff --git a/tests/ext/shm_data_internal_fns.phpt b/tests/ext/shm_data_internal_fns.phpt index cd85e14ba44..a1b8b3ff3ee 100644 --- a/tests/ext/shm_data_internal_fns.phpt +++ b/tests/ext/shm_data_internal_fns.phpt @@ -34,6 +34,7 @@ DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS=0.1 DD_TRACE_SIDECAR_TRACE_SENDER=1 DD_DYNAMIC_INSTRUMENTATION_ENABLED=1 DD_TRACE_IGNORE_AGENT_SAMPLING_RATES=0 +DD_TRACE_LOG_LEVEL=off --INI-- datadog.service=shm_data_test datadog.env=test @@ -64,9 +65,16 @@ $rr->setResponse(['rate_by_service' => [ dd_trace_internal_fn('synchronous_flush'); // ensure sidecar sends immediately $rr->waitForDataAndReplay(); -for ($i = 0; $i < 50; $i++) { +// Under concurrent run-tests load the best-effort synchronous_flush above can +// time out, delaying delivery of the trace that makes the replayer return the +// sampling rates. Re-trigger the flush periodically and poll generously so the +// agent sampling config eventually propagates into SHM. +for ($i = 0; $i < 100; $i++) { $sampling = dd_trace_internal_fn('get_agent_sampling_config'); if (!empty($sampling)) { break; } + if ($i % 10 === 9) { + dd_trace_internal_fn('synchronous_flush'); + } usleep(100000); } var_dump(is_array($sampling));