Skip to content

Commit

Permalink
lower library interface timeout for remote config tests (#2805)
Browse files Browse the repository at this point in the history
* lower library interface timeout

* lower poll interval

* lint

* lower poll interval

* even lower poll interval

* much lower poll interval

* switch back to 1s polling interval

---------

Co-authored-by: Charles de Beauchesne <[email protected]>
  • Loading branch information
rochdev and cbeauchesne authored Jul 29, 2024
1 parent dc83c78 commit 0a85fb0
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions utils/_context/_scenarios/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,17 +574,12 @@ def all_endtoend_scenarios(test_object):
scenario_groups=[ScenarioGroup.APPSEC],
)

# Remote config scenarios
# library timeout is set to 100 seconds
# default polling interval for tracers is very low (5 seconds)
# TODO configure the polling interval to a lower value instead of increasing the timeout

remote_config_mocked_backend_asm_features = EndToEndScenario(
"REMOTE_CONFIG_MOCKED_BACKEND_ASM_FEATURES",
rc_api_enabled=True,
appsec_enabled=False,
weblog_env={"DD_REMOTE_CONFIGURATION_ENABLED": "true"},
library_interface_timeout=100,
weblog_env={"DD_REMOTE_CONFIGURATION_ENABLED": "true", "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": "1",},
library_interface_timeout=20,
doc="",
scenario_groups=[ScenarioGroup.APPSEC],
)
Expand All @@ -596,17 +591,18 @@ def all_endtoend_scenarios(test_object):
"DD_DYNAMIC_INSTRUMENTATION_ENABLED": "1",
"DD_DEBUGGER_ENABLED": "1",
"DD_REMOTE_CONFIG_ENABLED": "true",
"DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": "1",
"DD_INTERNAL_RCM_POLL_INTERVAL": "1000",
},
library_interface_timeout=100,
library_interface_timeout=20,
doc="",
)

remote_config_mocked_backend_asm_dd = EndToEndScenario(
"REMOTE_CONFIG_MOCKED_BACKEND_ASM_DD",
rc_api_enabled=True,
weblog_env={"DD_APPSEC_RULES": None},
library_interface_timeout=100,
weblog_env={"DD_APPSEC_RULES": None, "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": "1",},
library_interface_timeout=20,
doc="""
The spec says that if DD_APPSEC_RULES is defined, then rules won't be loaded from remote config.
In this scenario, we use remote config. By the spec, whem remote config is available, rules file
Expand All @@ -621,8 +617,12 @@ def all_endtoend_scenarios(test_object):
remote_config_mocked_backend_asm_features_nocache = EndToEndScenario(
"REMOTE_CONFIG_MOCKED_BACKEND_ASM_FEATURES_NOCACHE",
rc_api_enabled=True,
weblog_env={"DD_APPSEC_ENABLED": "false", "DD_REMOTE_CONFIGURATION_ENABLED": "true",},
library_interface_timeout=100,
weblog_env={
"DD_APPSEC_ENABLED": "false",
"DD_REMOTE_CONFIGURATION_ENABLED": "true",
"DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": "1",
},
library_interface_timeout=20,
doc="",
scenario_groups=[ScenarioGroup.APPSEC],
)
Expand All @@ -634,15 +634,17 @@ def all_endtoend_scenarios(test_object):
"DD_DYNAMIC_INSTRUMENTATION_ENABLED": "1",
"DD_DEBUGGER_ENABLED": "1",
"DD_REMOTE_CONFIG_ENABLED": "true",
"DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": "1",
},
library_interface_timeout=100,
library_interface_timeout=20,
doc="",
)

remote_config_mocked_backend_asm_dd_nocache = EndToEndScenario(
"REMOTE_CONFIG_MOCKED_BACKEND_ASM_DD_NOCACHE",
rc_api_enabled=True,
library_interface_timeout=100,
weblog_env={"DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": "1",},
library_interface_timeout=20,
doc="",
scenario_groups=[ScenarioGroup.APPSEC],
)
Expand Down Expand Up @@ -688,8 +690,9 @@ def all_endtoend_scenarios(test_object):
"DD_REMOTE_CONFIG_ENABLED": "true",
"DD_INTERNAL_RCM_POLL_INTERVAL": "2000",
"DD_DEBUGGER_DIAGNOSTICS_INTERVAL": "1",
"DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": "1",
},
library_interface_timeout=100,
library_interface_timeout=20,
doc="Test scenario for checking if method probe statuses can be successfully 'RECEIVED' and 'INSTALLED'",
scenario_groups=[ScenarioGroup.DEBUGGER],
)
Expand Down

0 comments on commit 0a85fb0

Please sign in to comment.