Repository navigation
[tests] Don't rely on fake monotonic time starting at epoch 0 - #49179
Merged
Merged
Conversation
Signed-off-by: Raven Black <[email protected]>
ravenblackx
requested review from
RyanTheOptimist,
abeyad,
kyessenov,
mattklein123,
nezdolik,
tonya11en and
wbpcode
as code owners
November 11, 2026 17:01
ravenblackx
enabled auto-merge (squash)
November 11, 2026 17:33
Member
|
/retest flakey infra |
oschaaf
added a commit
to We-Amp/envoy
that referenced
this pull request
Nov 27, 2026
main's simulated time no longer starts at epoch 0 (envoyproxy#49179), and setMonotonicTime() ignores a move backwards. The two cases that wait for the delayed close timer set the clock to 0 ms and then 100 ms, so on main the timer never fired and they hung. They now advance the clock by 100 ms from its current value, as the other delayed close tests in this file do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: [tests] Don't rely on fake monotonic time starting at epoch 0
Additional Description: Currently many tests rely on the fake monotonic time running from zero. This is misleading and can lead to fragile tests; time should be relative. It's also incompatible with using fake monotonic time in http3 contexts because some http3 code uses zero-time to mean the timer is uninitialized.
This changes the default to starting at 1 second, so we can't incorrectly rely on zero-epoch and so it can be used with http3, and updates all the tests that relied on it starting at 0 to use relative time, including the fragile test of token buckets, in which the behavior of floating point rounding changes when the start time changes.
This is a split from PR #49120.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a