-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy_serve_stale: Test updates #8928
proxy_serve_stale: Test updates #8928
Conversation
@serrislew: can you please review this? |
Looks good to me. Is this the standard of how autests should be created now? |
This updates the proxy_serve_stale test to run more quickly (about 15 seconds instead of about 2 minutes). While doing so, the test is also converted to use Proxy Verifier.
781d279
to
e746e23
Compare
Thank you for the review, @serrislew.
Standard is a strong word. In case it's helpful to share, here are a couple of my observations with the AuTests: Test Class OrganizationI noticed when reviewing @masaori335's PRs that when he adds AuTests he structures them around a test class with helper methods that define each component of the test (setup_traffic_server, setup_server, run_the_cases, etc.). I find this a very helpful way to organize the test for readability. So I picked this up from him and generally follow his example. Proxy VerifierProxy Verifier has some advantages over curl:
For these reasons, I prefer using Proxy Verifier over curl in many cases. But I'm biased since I maintain the Proxy Verifier project (@SolidWallOfCode wrote the initial version of Proxy Verifier, I now maintain it). That said, I still do sometimes use curl when all that is needed is a simple request to exercise ATS when no server is needed. In those cases, creating a replay file is verbose in comparison to a simple curl command. That guides me when I work with AuTests. But I won't block PRs that don't follow these practices. |
This updates the proxy_serve_stale test to run more quickly (about 15 seconds instead of about 2 minutes). While doing so, the test is also converted to use Proxy Verifier. (cherry picked from commit 952bf25)
Cherry-picked to v9.2.x |
This updates the proxy_serve_stale test to run more quickly (about 15 seconds instead of about 2 minutes). While doing so, the test is also converted to use Proxy Verifier. (cherry picked from commit 952bf25)
* asf/9.2.x: Updated ChangeLog trim white spaces before and after the equal sign (apache#8638) Fixes compacting spaces in S3 auth plugin (apache#8579) Fixed issues when compiling with -Og (apache#8665) Update lua plugin examples (apache#8646) Additional helper functions for request transform (apache#8631) Move ChangeLog and README.md to the lib/fastlz/ (apache#8629) Remove unused functions/definitions from ink_defs (apache#8714) Stop ATS when a global lua script fails to load (apache#8671) Change DNS retries to be a static (requires restart) config value (apache#8724) add log format for whether origin TLS connection resumed an existing TLS session (apache#8745) Update location for core rule set in modsecurity example (apache#8924) Remove unnecessary use of a memory arena when logging. (apache#8925) Add docs for remap_stats plugin (apache#8927) Allows errors from plugin initialization to bubble up (apache#8926) proxy_serve_stale: Test updates (apache#8928) Make clang-format not modify ink_autoconf.h.in and ink_autoconf.h (apache#8935) Fix clang-format installation with multiple threads (apache#8931) Add nullptr check of HTTPInfo (apache#8937)
This updates the proxy_serve_stale test to run more quickly (about 15
seconds instead of about 2 minutes). While doing so, the test is also
converted to use Proxy Verifier.
Other than adjusting the timing this is not a functional change. The same transactions are performed to exercise serving the stale entries.