@@ -78,10 +78,8 @@ class Test_Defaults:
78
78
def test_library_settings (self , library_env , test_agent , test_library ):
79
79
with test_library .dd_start_span ("test" ):
80
80
pass
81
- event = test_agent .wait_for_telemetry_event ("app-started" , wait_loops = 400 )
82
- configuration = event ["payload" ]["configuration" ]
83
81
84
- configuration_by_name = { item [ "name" ]: item for item in configuration }
82
+ configuration_by_name = test_agent . wait_for_telemetry_configurations ()
85
83
for apm_telemetry_name , value in [
86
84
("trace_sample_rate" , (1.0 , None , "1.0" )),
87
85
("logs_injection_enabled" , ("false" , False , "true" , True )),
@@ -152,10 +150,8 @@ class Test_Consistent_Configs:
152
150
def test_library_settings (self , library_env , test_agent , test_library ):
153
151
with test_library .dd_start_span ("test" ):
154
152
pass
155
- event = test_agent .wait_for_telemetry_event ("app-started" , wait_loops = 400 )
156
- configuration = event ["payload" ]["configuration" ]
157
- configuration_by_name = {item ["name" ]: item for item in configuration }
158
153
154
+ configuration_by_name = test_agent .wait_for_telemetry_configurations ()
159
155
# # Check that the tags name match the expected value
160
156
assert configuration_by_name .get ("DD_ENV" , {}).get ("value" ) == "dev"
161
157
assert configuration_by_name .get ("DD_SERVICE" , {}).get ("value" ) == "service_test"
@@ -189,10 +185,8 @@ def test_library_settings(self, library_env, test_agent, test_library):
189
185
def test_library_settings_2 (self , library_env , test_agent , test_library ):
190
186
with test_library .dd_start_span ("test" ):
191
187
pass
192
- event = test_agent .wait_for_telemetry_event ("app-started" , wait_loops = 400 )
193
- configuration = event ["payload" ]["configuration" ]
194
- configuration_by_name = {item ["name" ]: item for item in configuration }
195
188
189
+ configuration_by_name = test_agent .wait_for_telemetry_configurations ()
196
190
assert configuration_by_name .get ("DD_TRACE_LOG_DIRECTORY" , {}).get ("value" ) == "/some/temporary/directory"
197
191
assert configuration_by_name .get ("DD_TRACE_HTTP_CLIENT_ERROR_STATUSES" , {}).get ("value" ) == "200-250"
198
192
assert configuration_by_name .get ("DD_TRACE_HTTP_SERVER_ERROR_STATUSES" , {}).get ("value" ) == "250-200"
@@ -230,10 +224,8 @@ class Test_Environment:
230
224
def test_library_settings (self , library_env , test_agent , test_library ):
231
225
with test_library .dd_start_span ("test" ):
232
226
pass
233
- event = test_agent .wait_for_telemetry_event ("app-started" , wait_loops = 400 )
234
- configuration = event ["payload" ]["configuration" ]
235
227
236
- configuration_by_name = { item [ "name" ]: item for item in configuration }
228
+ configuration_by_name = test_agent . wait_for_telemetry_configurations ()
237
229
for apm_telemetry_name , environment_value in [
238
230
("trace_sample_rate" , ("0.3" , 0.3 )),
239
231
("logs_injection_enabled" , ("true" , True )),
@@ -496,9 +488,8 @@ def test_stable_configuration_origin(
496
488
)
497
489
test_library .container_restart ()
498
490
test_library .dd_start_span ("test" )
499
- event = test_agent .wait_for_telemetry_event ("app-started" , wait_loops = 400 )
500
- configuration = {c ["name" ]: c for c in event ["payload" ]["configuration" ]}
501
491
492
+ configuration = test_agent .wait_for_telemetry_configurations ()
502
493
for cfg_name , origin in expected_origin .items ():
503
494
apm_telemetry_name = _mapped_telemetry_name (context , cfg_name )
504
495
telemetry_item = configuration [apm_telemetry_name ]
0 commit comments