Skip to content

test: deflake QuicInplaceLdsIntegrationTest drain waits - #49300

Merged
phlax merged 1 commit into
envoyproxy:mainfrom
derekargueta:dargueta-deflake-quic-http-integration-inplace-lds
Nov 16, 2026
Merged

phlax merged 1 commit into
envoyproxy:mainfrom
derekargueta:dargueta-deflake-quic-http-integration-inplace-lds

Conversation

@derekargueta

Copy link
Copy Markdown
Member

Commit Message: test: deflake QuicInplaceLdsIntegrationTest drain waits

The in-place LDS tests wait for listener_manager.total_filter_chains_draining to reach 1 and then 0, but the gauge only stays up for the 1s drain time. A test thread descheduled for longer than that under tsan never sees it rise and burns the whole wait. The next QUIC connection then times out its handshake straight away, because QuicConnection starts its handshake clock from the test dispatcher's cached time, which went stale during that wait. The tests now wait for listener_create_success to count one creation per worker per update, which the main thread only does after inPlaceFilterChainUpdate() has already started the drain, and then for the gauge to reach 0.

Additional Description:
This hit EnableAndDisableResumption/IPv4 under tsan. It's the same timeout as #31183 (EnableAndDisableEarlyData) and #33453 (ReloadConfigUpdateDefaultFilterChain), both closed as stale. listener_in_place_updated alone isn't enough to wait on, since it's bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by me prior to opening.

Risk Level: Low (test only)
Testing:

  • bazel test //test/integration:quic_http_integration_test --test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20: 200/200 pass (macOS arm64, fastbuild)
    Docs Changes: N/A
    Release Notes: N/A
    Platform Specific Features: N/A

The in place LDS tests waited for listener_manager.total_filter_chains_draining to reach 1 before
waiting for it to fall back to 0, but the gauge only stays up for the 1s drain time, so a test
thread descheduled for longer under tsan never sees it rise and burns the whole wait timeout. The
next QUIC connection then times out its handshake immediately, because QuicConnection starts its
handshake clock from the test dispatcher's cached time, which went stale during that wait.

The tests now wait for every worker to acknowledge the update via listener_create_success, which
the main thread only counts after it has already started the drain, and then wait for the gauge to
reach 0.

Signed-off-by: Derek Argueta <[email protected]>
@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #49300 was opened by derekargueta.

see: more, trace.

@phlax

phlax commented Nov 15, 2026

Copy link
Copy Markdown
Member

Deflake numbers (tsan, --test_filter='*QuicInplaceLdsIntegrationTest*', 200 runs x 5 shards, envoy-ci-staging):

run result
main @ da70d1a 43757067468 10/1000 fail (QUIC_HANDSHAKE_TIMEOUT)
this PR 43758244881 1000/1000 pass

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.

🟢 Approval recommended

There are no outstanding review issues for the test-only QUIC listener-update wait changes.

No open issues 🎉

What changed in this PR

This test-only change addresses flaky QUIC in-place listener update waits, including the failures reported in #31183 and #33453. It avoids relying on a drain gauge that can rise and fall while the test thread is descheduled.

Changes:

  • Adds a shared helper that waits for worker listener-creation acknowledgments before waiting for draining to finish.
  • Replaces repeated transient-gauge waits across filter-chain update, early-data, and session-resumption tests.
File Description
test/​integration/​quic_http_integration_test.cc Adds and applies a counter-based helper for reliable in-place listener update drain waits.

Review effort: Balanced

@derekargueta
derekargueta marked this pull request as ready for review November 15, 2026 23:25

@phlax phlax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, thanks @derekargueta

@phlax
phlax merged commit 8937718 into envoyproxy:main Nov 16, 2026
26 checks passed
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>

Backport note (release/v1.38): the helper uses this branch's `waitForCounterGe()`
and `waitForGaugeEq()`, as it has no matcher overloads (envoyproxy#44864), and
`EnableAndDisableResumption` is not on this branch.

(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>

Backport note (release/v1.38): the helper uses this branch's `waitForCounterGe()`
and `waitForGaugeEq()`, as it has no matcher overloads (envoyproxy#44864), and
`EnableAndDisableResumption` is not on this branch.

(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>

Backport note (release/v1.38): the helper uses this branch's `waitForCounterGe()`
and `waitForGaugeEq()`, as it has no matcher overloads (envoyproxy#44864), and
`EnableAndDisableResumption` is not on this branch.

(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>

Backport note (release/v1.38): the helper uses this branch's `waitForCounterGe()`
and `waitForGaugeEq()`, as it has no matcher overloads (envoyproxy#44864), and
`EnableAndDisableResumption` is not on this branch.

(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit that referenced this pull request Nov 17, 2026
The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as #31183 (`EnableAndDisableEarlyData`) and #33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>

Backport note (release/v1.38): the helper uses this branch's `waitForCounterGe()`
and `waitForGaugeEq()`, as it has no matcher overloads (envoyproxy#44864), and
`EnableAndDisableResumption` is not on this branch.

(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>

Backport note (release/v1.38): the helper uses this branch's `waitForCounterGe()`
and `waitForGaugeEq()`, as it has no matcher overloads (envoyproxy#44864), and
`EnableAndDisableResumption` is not on this branch.

(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>

Backport note (release/v1.38): the helper uses this branch's `waitForCounterGe()`
and `waitForGaugeEq()`, as it has no matcher overloads (envoyproxy#44864), and
`EnableAndDisableResumption` is not on this branch.

(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>

Backport note (release/v1.38): the helper uses this branch's `waitForCounterGe()`
and `waitForGaugeEq()`, as it has no matcher overloads (envoyproxy#44864), and
`EnableAndDisableResumption` is not on this branch.

(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 18, 2026
…9300)

The in-place LDS tests wait for
`listener_manager.total_filter_chains_draining` to reach 1 and then 0,
but the gauge only stays up for the 1s drain time. A test thread
descheduled for longer than that under tsan never sees it rise and burns
the whole wait. The next QUIC connection then times out its handshake
straight away, because `QuicConnection` starts its handshake clock from
the test dispatcher's cached time, which went stale during that wait.
The tests now wait for `listener_create_success` to count one creation
per worker per update, which the main thread only does after
`inPlaceFilterChainUpdate()` has already started the drain, and then for
the gauge to reach 0.

Additional Description:
This hit `EnableAndDisableResumption/IPv4` under tsan. It's the same
timeout as envoyproxy#31183 (`EnableAndDisableEarlyData`) and envoyproxy#33453
(`ReloadConfigUpdateDefaultFilterChain`), both closed as stale.
`listener_in_place_updated` alone isn't enough to wait on, since it's
bumped when the update is accepted, before the new listener warms.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- `bazel test //test/integration:quic_http_integration_test
--test_filter='*QuicInplaceLdsIntegrationTest*' --runs_per_test=20`:
200/200 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>

Backport note (release/v1.38): the helper uses this branch's `waitForCounterGe()`
and `waitForGaugeEq()`, as it has no matcher overloads (envoyproxy#44864), and
`EnableAndDisableResumption` is not on this branch.

(cherry picked from commit 8937718)
Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants