Skip to content

stale_response.test.py: address log wait flakiness - #13323

Merged
bneradt merged 1 commit into
apache:masterfrom
bneradt:fix-stale-response-log-wait
Jul 13, 2026
Merged

bneradt merged 1 commit into
apache:masterfrom
bneradt:fix-stale-response-log-wait

Conversation

@bneradt

@bneradt bneradt commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The stale_response log checks can run before every directive that
they later assert has been written. Waiting for one marker with a
sleep-based process leaves the final content checks exposed to ATS log
flush timing when both stale directives are expected.

This replaces the sleep-based watcher with explicit await runs for each
directive being asserted. The test now waits for the matching
stale-while-revalidate and stale-if-error entries before performing the
final log content checks.

Fixes: #13301

Copilot AI review requested due to automatic review settings June 24, 2026 20:43
@bneradt bneradt added this to the 11.0.0 milestone Jun 24, 2026
@bneradt bneradt self-assigned this Jun 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@bneradt
bneradt force-pushed the fix-stale-response-log-wait branch from c71c621 to 3826654 Compare June 24, 2026 20:52
@maskit
maskit requested a review from Copilot June 24, 2026 21:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread tests/gold_tests/pluginTest/stale_response/stale_response.test.py
@bneradt
bneradt force-pushed the fix-stale-response-log-wait branch from 3826654 to 4437425 Compare June 24, 2026 21:41
@bneradt
bneradt force-pushed the fix-stale-response-log-wait branch from 4437425 to 86d058e Compare June 25, 2026 18:45
Copilot AI review requested due to automatic review settings June 25, 2026 18:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@bryancall
bryancall requested a review from moonchen June 29, 2026 22:34
moonchen
moonchen previously approved these changes Jul 2, 2026

@moonchen moonchen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good. One optional suggestion below.

Comment thread tests/gold_tests/pluginTest/stale_response/stale_response.test.py Outdated
Comment thread tests/gold_tests/pluginTest/stale_response/stale_response.test.py Outdated
The stale_response log checks can run before every directive that
they later assert has been written. Waiting for one marker with a
sleep-based process leaves the final content checks exposed to ATS log
flush timing when both stale directives are expected.

This replaces the sleep-based watcher with explicit await runs for each
directive being asserted. The test now waits for the matching
stale-while-revalidate and stale-if-error entries before performing the
final log content checks.

Fixes: apache#13301
Copilot AI review requested due to automatic review settings July 13, 2026 16:18
@bneradt
bneradt force-pushed the fix-stale-response-log-wait branch from 86d058e to c31ce2f Compare July 13, 2026 16:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@bneradt
bneradt merged commit e3dc7e7 into apache:master Jul 13, 2026
15 checks passed
@bneradt
bneradt deleted the fix-stale-response-log-wait branch July 13, 2026 17:40
@github-project-automation github-project-automation Bot moved this to For v10.2.0 in ATS v10.2.x Jul 13, 2026
@github-project-automation github-project-automation Bot moved this to For v10.1.1 in ATS v10.1.x Jul 13, 2026

@moonchen moonchen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@moonchen moonchen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Jul 29, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Jul 29, 2026
@cmcfarlen

Copy link
Copy Markdown
Contributor

Cherry-picked to 10.2.x

cmcfarlen pushed a commit that referenced this pull request Jul 29, 2026
The stale_response log checks can run before every directive that
they later assert has been written. Waiting for one marker with a
sleep-based process leaves the final content checks exposed to ATS log
flush timing when both stale directives are expected.

This replaces the sleep-based watcher with explicit await runs for each
directive being asserted. The test now waits for the matching
stale-while-revalidate and stale-if-error entries before performing the
final log content checks.

Fixes: #13301
(cherry picked from commit e3dc7e7)
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jul 29, 2026
The stale_response log checks can run before every directive that
they later assert has been written. Waiting for one marker with a
sleep-based process leaves the final content checks exposed to ATS log
flush timing when both stale directives are expected.

This replaces the sleep-based watcher with explicit await runs for each
directive being asserted. The test now waits for the matching
stale-while-revalidate and stale-if-error entries before performing the
final log content checks.

Fixes: apache#13301
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: For v10.1.1
Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

Intermittent AuTest failure: stale_response (directive missing from stale_responses.log)

4 participants