Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Apr 25, 2023

Make the emergency and fatal autests more reliable by improving their Ready conditions.

This is a cherry-pick from master of the following two PRs:

(cherry picked from commit c175aa4)
(cherry picked from commit 086501c)

bneradt added 2 commits April 25, 2023 18:35
A number of tests were flakey because of race conditions between the AuTest framework finishing the Default TestRun process and ending the test, and therefore the traffic server process, before traffic server had time to exercise the expected functionality of the test. This improves the Ready conditions for these tests which should improve their reliability.

(cherry picked from commit c175aa4)
This is a second iteration to further improve some of the autests that
exercise ATS shutting down during test execution. See apache#9372 for the
previous patch. The previous update improved reliability, but still had
a race condition between autest recognizing ATS process shutdown and ATS
writing the expected error log. If it detected the ts process ending
before the log was written, the autest would fail because the framework
thought the process ended before the Ready condition was satisfied. This
patch addresses this by using a separate process to wait upon the log
entry instead of making the ts Ready condition the content of the log
file.

(cherry picked from commit 086501c)
@bneradt bneradt added the AuTest label Apr 25, 2023
@bneradt bneradt added this to the 9.2.1 milestone Apr 25, 2023
@bneradt bneradt requested a review from zwoop April 25, 2023 18:41
@bneradt bneradt self-assigned this Apr 25, 2023
@bneradt bneradt requested a review from bryancall as a code owner April 25, 2023 18:41
@bneradt
Copy link
Contributor Author

bneradt commented Apr 25, 2023

Fixing the debian builds requires @lzx404243 's fix for --enable-hardening:
#9617

@zwoop zwoop merged commit a1eb655 into apache:9.2.x Apr 26, 2023
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Jul 24, 2023
* Fix autest flakiness due better Ready Conditions (apache#9372)

A number of tests were flakey because of race conditions between the AuTest framework finishing the Default TestRun process and ending the test, and therefore the traffic server process, before traffic server had time to exercise the expected functionality of the test. This improves the Ready conditions for these tests which should improve their reliability.

(cherry picked from commit c175aa4)

* Make autest ts shutdown tests more reliable (apache#9391)

This is a second iteration to further improve some of the autests that
exercise ATS shutting down during test execution. See apache#9372 for the
previous patch. The previous update improved reliability, but still had
a race condition between autest recognizing ATS process shutdown and ATS
writing the expected error log. If it detected the ts process ending
before the log was written, the autest would fail because the framework
thought the process ended before the Ready condition was satisfied. This
patch addresses this by using a separate process to wait upon the log
entry instead of making the ts Ready condition the content of the log
file.

(cherry picked from commit 086501c)
(cherry picked from commit a1eb655)
@bneradt bneradt deleted the stabilize_92x_autests branch June 17, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants