10.2.x: Add Test.AddConfigReload() autest extension (#13075) - #13502
Merged
cmcfarlen merged 1 commit intoAug 5, 2026
Conversation
Config reload AuTests rely on fire-and-forget traffic_ctl calls plus sleeps and log grepping. This makes the tests slow and fragile and cannot verify specific handlers or report reload failures. This adds Test.AddConfigReload() to monitor reload completion and validate task status. It carries filenames through child reload tasks and migrates the applicable tests to the deterministic helper. Fixes: apache#12965 (cherry picked from commit 7085923)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the determinism and observability of AuTests that exercise configuration reloads by introducing a reusable Test.AddConfigReload() helper and migrating existing gold tests away from sleep/log-grep synchronization. It also enhances the config reload task trace so dependent/child reload tasks can carry filenames, enabling structured validation of which handlers ran.
Changes:
- Add
tests/gold_tests/autest-site/config_reload.test.extimplementingTest.AddConfigReload()usingtraffic_ctl config reload -mplus optional JSONRPC task-tree validation. - Propagate filenames through child/dependent reload tasks (
ConfigContext/ConfigReloadTask) and wire SSL reload subtasks to known config filenames. - Migrate multiple AuTests from fire-and-forget reload + sleeps/log greps to the new helper; add developer documentation for the new extension.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/gold_tests/traffic_ctl/remap_inc/wait_reload.sh | Removes legacy log-grep helper script for reload waiting. |
| tests/gold_tests/traffic_ctl/remap_inc/remap_inc.test.py | Switches remap include reload test to Test.AddConfigReload(). |
| tests/gold_tests/tls/tls_verify4.test.py | Replaces reload+sleep with Test.AddConfigReload() in TLS verify test. |
| tests/gold_tests/tls/tls_tunnel.test.py | Uses Test.AddConfigReload() and removes log-based readiness gating. |
| tests/gold_tests/tls/tls_sni_yaml_reload.test.py | Uses Test.AddConfigReload() for expected-fail reloads; adjusts ATS process settings. |
| tests/gold_tests/tls/tls_client_cert.test.py | Migrates SNI reload synchronization to Test.AddConfigReload(). |
| tests/gold_tests/tls/tls_client_cert_plugin.test.py | Migrates plugin TLS client-cert reload synchronization to Test.AddConfigReload(). |
| tests/gold_tests/tls/tls_client_cert_override_plugin.test.py | Migrates override plugin reload synchronization to Test.AddConfigReload(). |
| tests/gold_tests/tls/tls_check_cert_selection_reload.test.py | Replaces log-based multicert reload wait with Test.AddConfigReload(). |
| tests/gold_tests/tls/ssl_multicert_loader.test.py | Uses Test.AddConfigReload() for expected-fail multicert reload; adjusts ATS process settings. |
| tests/gold_tests/tls/ssl_key_dialog.test.py | Simplifies “await reload” logic via Test.AddConfigReload(). |
| tests/gold_tests/remap/remap_reload.test.py | Migrates remap reload success/failure tests to Test.AddConfigReload() with task expectations. |
| tests/gold_tests/remap/remap_acl.test.py | Replaces manual reload + condwait with Test.AddConfigReload() in remap ACL test flow. |
| tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate_miss.test.py | Splits touch vs reload steps and uses Test.AddConfigReload() for reload. |
| tests/gold_tests/parent_config/parent_config_reload.test.py | Replaces sleep/log-ready gating with Test.AddConfigReload(). |
| tests/gold_tests/logging/log_retention.test.py | Uses Test.AddConfigReload() instead of direct traffic_ctl invocation. |
| tests/gold_tests/ip_allow/ip_category.test.py | Migrates ip_allow reload synchronization to Test.AddConfigReload(). |
| tests/gold_tests/ip_allow/ip_allow_reload_triggered.test.py | Migrates multiple reload cases (including absent-task validation) to Test.AddConfigReload(). |
| tests/gold_tests/dns/splitdns_reload.test.py | Migrates splitdns reload synchronization to Test.AddConfigReload(). |
| tests/gold_tests/cache/cache_config_reload.test.py | Uses Test.AddConfigReload() and preserves token-based reload identification. |
| tests/gold_tests/autest-site/config_reload.test.ext | New AuTest extension providing Test.AddConfigReload() and task-tree validation utilities. |
| src/mgmt/config/ConfigReloadTrace.cc | Extends child task creation to accept and propagate filenames via ConfigContext. |
| src/mgmt/config/ConfigContext.cc | Updates dependent context creation to pass filename through to child tasks. |
| src/iocore/net/SSLClientCoordinator.cc | Adds filename metadata to SSL-related dependent reload tasks for traceability. |
| include/mgmt/config/ConfigReloadTrace.h | Updates ConfigReloadTask::add_child() signature to accept filename metadata. |
| include/mgmt/config/ConfigContext.h | Updates ConfigContext::add_dependent_ctx() signature to accept filename metadata. |
| doc/developer-guide/testing/index.en.rst | Adds config reload extension documentation to the testing guide index. |
| doc/developer-guide/testing/config-reload-ext.en.rst | New documentation page describing Test.AddConfigReload() usage and semantics. |
| doc/developer-guide/config-reload-framework.en.rst | Updates reload framework docs to recommend the new autest extension for end-to-end tests. |
Test.AddConfigReload() autest extension (#13075)Test.AddConfigReload() autest extension (#13075)
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Config reload AuTests rely on fire-and-forget traffic_ctl calls plus
sleeps and log grepping. This makes the tests slow and fragile and
cannot verify specific handlers or report reload failures.
This adds Test.AddConfigReload() to monitor reload completion and
validate task status. It carries filenames through child reload tasks
and migrates the applicable tests to the deterministic helper.
Fixes: #12965
(cherry picked from commit 7085923)