From b3886f14e5c001b8e5a9f6f242a008c344e41e93 Mon Sep 17 00:00:00 2001 From: Vlad Scherbich Date: Thu, 19 Feb 2026 11:25:31 -0500 Subject: [PATCH] Fix set_and_wait_rc helper by clearing out stale events before new config --- tests/parametric/test_dynamic_configuration.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/parametric/test_dynamic_configuration.py b/tests/parametric/test_dynamic_configuration.py index 62cb25a2e0c..24e3a9686c1 100644 --- a/tests/parametric/test_dynamic_configuration.py +++ b/tests/parametric/test_dynamic_configuration.py @@ -190,10 +190,13 @@ def set_and_wait_rc(test_agent: TestAgentAPI, config_overrides: dict[str, Any], """ rc_config = _create_rc_config(config_overrides) + # Remove stale events before setting new config + test_agent.clear() + _set_rc(test_agent, rc_config, config_id) # Wait for both the telemetry event and the RC apply status. - test_agent.wait_for_telemetry_event("app-client-configuration-change", clear=True) + test_agent.wait_for_telemetry_event("app-client-configuration-change") return test_agent.wait_for_rc_apply_state("APM_TRACING", state=RemoteConfigApplyState.ACKNOWLEDGED, clear=True)