Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Mar 31, 2021

This is a cherry-pick of #6931

I'm pulling this into 9.0.x because the production change is very safe: it only adds a log message when the cache is fully initialized. But the test payoff is significant: this gives the AuTests something more reliable to wait upon before starting. Without this, the 9.0.x AuTests will fail intermittently because some tests run too early before the cache is initialized and then fail. At the time of this PR, this happened for the last two autest-9.0.x runs.

I acknowledge that the diff is large for 9.0.x, but the product change is small and safe and 95% of the patch are test changes.


This aims to make the AuTests more reliable by providing a log message
from traffic server wich the AutTests can use as a ready condition
before the tests are started.

Many tests, however, override the default MakeATSProcess ready
condition. This was generally not uneccesary since they almost alway
overwrote it with the same PortOpen When Ready condidtion. In any case,
to take advantage of the new Ready, the tests have to be cleaned up to
not set their own Ready. While doing this, I added the enable_cache
directive to make setting the cache or not a more convenient mechanism
for the MakeATSProcess caller.

(cherry picked from commit 93a72ec)

Conflicts:
tests/gold_tests/autest-site/copy_config.test.ext
tests/gold_tests/basic/deny0.test.py
tests/gold_tests/bigobj/bigobj.test.py
tests/gold_tests/cache/cache-control.test.py
tests/gold_tests/chunked_encoding/chunked_encoding.test.py
tests/gold_tests/continuations/double.test.py
tests/gold_tests/continuations/session_id.test.py
tests/gold_tests/h2/h2spec.test.py
tests/gold_tests/h2/http2.test.py
tests/gold_tests/h2/nghttp.test.py
tests/gold_tests/headers/cache_and_req_body.test.py
tests/gold_tests/headers/cachedIMSRange.test.py
tests/gold_tests/headers/forwarded.test.py
tests/gold_tests/headers/syntax.test.py
tests/gold_tests/ip_allow/ip_allow.test.py
tests/gold_tests/logging/log-filter.test.py
tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py
tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py
tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py
tests/gold_tests/pluginTest/regex_remap/regex_remap.test.py
tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py
tests/gold_tests/pluginTest/slice/slice.test.py
tests/gold_tests/pluginTest/slice/slice_error.test.py
tests/gold_tests/pluginTest/slice/slice_regex.test.py
tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py
tests/gold_tests/pluginTest/sslheaders/sslheaders.test.py
tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py
tests/gold_tests/post_slow_server/post_slow_server.test.py
tests/gold_tests/redirect/redirect_actions.test.py
tests/gold_tests/redirect/redirect_post.test.py
tests/gold_tests/remap/regex_map.test.py

This aims to make the AuTests more reliable by providing a log message
from traffic server wich the AutTests can use as a ready condition
before the tests are started.

Many tests, however, override the default MakeATSProcess ready
condition. This was generally not uneccesary since they almost alway
overwrote it with the same PortOpen When Ready condidtion. In any case,
to take advantage of the new Ready, the tests have to be cleaned up to
not set their own Ready. While doing this, I added the enable_cache
directive to make setting the cache or not a more convenient mechanism
for the MakeATSProcess caller.

(cherry picked from commit 93a72ec)

Conflicts:
	tests/gold_tests/autest-site/copy_config.test.ext
	tests/gold_tests/basic/deny0.test.py
	tests/gold_tests/bigobj/bigobj.test.py
	tests/gold_tests/cache/cache-control.test.py
	tests/gold_tests/chunked_encoding/chunked_encoding.test.py
	tests/gold_tests/continuations/double.test.py
	tests/gold_tests/continuations/session_id.test.py
	tests/gold_tests/h2/h2spec.test.py
	tests/gold_tests/h2/http2.test.py
	tests/gold_tests/h2/nghttp.test.py
	tests/gold_tests/headers/cache_and_req_body.test.py
	tests/gold_tests/headers/cachedIMSRange.test.py
	tests/gold_tests/headers/forwarded.test.py
	tests/gold_tests/headers/syntax.test.py
	tests/gold_tests/ip_allow/ip_allow.test.py
	tests/gold_tests/logging/log-filter.test.py
	tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py
	tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py
	tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py
	tests/gold_tests/pluginTest/regex_remap/regex_remap.test.py
	tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py
	tests/gold_tests/pluginTest/slice/slice.test.py
	tests/gold_tests/pluginTest/slice/slice_error.test.py
	tests/gold_tests/pluginTest/slice/slice_regex.test.py
	tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py
	tests/gold_tests/pluginTest/sslheaders/sslheaders.test.py
	tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py
	tests/gold_tests/post_slow_server/post_slow_server.test.py
	tests/gold_tests/redirect/redirect_actions.test.py
	tests/gold_tests/redirect/redirect_post.test.py
	tests/gold_tests/remap/regex_map.test.py
@bneradt bneradt added this to the 9.0.1 milestone Mar 31, 2021
@bneradt bneradt requested a review from zwoop March 31, 2021 17:36
@bneradt bneradt self-assigned this Mar 31, 2021
@zwoop zwoop merged commit f29d601 into apache:9.0.x Apr 1, 2021
@bneradt bneradt deleted the cherry_pick_ats_initialized_log branch June 9, 2021 18:24
moonchen pushed a commit to moonchen/trafficserver that referenced this pull request Jul 26, 2022
This aims to make the AuTests more reliable by providing a log message
from traffic server wich the AutTests can use as a ready condition
before the tests are started.

Many tests, however, override the default MakeATSProcess ready
condition. This was generally not uneccesary since they almost alway
overwrote it with the same PortOpen When Ready condidtion. In any case,
to take advantage of the new Ready, the tests have to be cleaned up to
not set their own Ready. While doing this, I added the enable_cache
directive to make setting the cache or not a more convenient mechanism
for the MakeATSProcess caller.

(cherry picked from commit 93a72ec)

Conflicts:
	tests/gold_tests/autest-site/copy_config.test.ext
	tests/gold_tests/basic/deny0.test.py
	tests/gold_tests/bigobj/bigobj.test.py
	tests/gold_tests/cache/cache-control.test.py
	tests/gold_tests/chunked_encoding/chunked_encoding.test.py
	tests/gold_tests/continuations/double.test.py
	tests/gold_tests/continuations/session_id.test.py
	tests/gold_tests/h2/h2spec.test.py
	tests/gold_tests/h2/http2.test.py
	tests/gold_tests/h2/nghttp.test.py
	tests/gold_tests/headers/cache_and_req_body.test.py
	tests/gold_tests/headers/cachedIMSRange.test.py
	tests/gold_tests/headers/forwarded.test.py
	tests/gold_tests/headers/syntax.test.py
	tests/gold_tests/ip_allow/ip_allow.test.py
	tests/gold_tests/logging/log-filter.test.py
	tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py
	tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py
	tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py
	tests/gold_tests/pluginTest/regex_remap/regex_remap.test.py
	tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py
	tests/gold_tests/pluginTest/slice/slice.test.py
	tests/gold_tests/pluginTest/slice/slice_error.test.py
	tests/gold_tests/pluginTest/slice/slice_regex.test.py
	tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py
	tests/gold_tests/pluginTest/sslheaders/sslheaders.test.py
	tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py
	tests/gold_tests/post_slow_server/post_slow_server.test.py
	tests/gold_tests/redirect/redirect_actions.test.py
	tests/gold_tests/redirect/redirect_post.test.py
	tests/gold_tests/remap/regex_map.test.py
(cherry picked from commit f29d601)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants