Repository navigation
fix: only count the time a timer callback is blocked towards the limit that moves the clock on - #1192
Merged
Merged
Conversation
…t that moves the clock on The thread that fires a timer waits for its callback for at most one second of real time, so that a callback which blocks on the code that moves the clock cannot deadlock it. On a loaded machine, a callback that still runs but whose thread does not get scheduled for a second hit the same limit, so the clock passed the next timer before the callback completed. This let a delay run to its end although an earlier timeout canceled it, which made `NestedWait_WhenTheTimeoutIsShorter_ShouldFailWithTheTimeoutOnTheTimeProviderOfTheEvaluation` in aweXpect flaky on CI. The limit now only counts the time in which the thread of the callback is blocked in a wait. A callback that keeps running, e.g. one that spins until the clock moves, still releases the clock after 30 seconds.
|
This pull request is merged. |
Test Results 80 files ± 0 80 suites ±0 1h 41m 19s ⏱️ +26s Results for commit 677c61a. ± Comparison against base commit 0b00896. This pull request removes 84599 and adds 84591 tests. Note that renamed tests count towards both.This pull request removes 4662 skipped tests and adds 4662 skipped tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
…e HasFlag for the thread state
|
|
This is addressed in release v8.0.0. |
This was referenced Nov 11, 2026
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.



The thread that fires a timer waits for its callback for at most one second of real time, so that a callback which blocks on the code that moves the clock cannot deadlock it. On a loaded machine, a callback that still runs but whose thread does not get scheduled for a second hit the same limit, so the clock passed the next timer before the callback completed. This let a delay run to its end although an earlier timeout canceled it, which made
NestedWait_WhenTheTimeoutIsShorter_ShouldFailWithTheTimeoutOnTheTimeProviderOfTheEvaluationin aweXpect flaky on CI.The limit now only counts the time in which the thread of the callback is blocked in a wait. A callback that keeps running, e.g. one that spins until the clock moves, still releases the clock after 30 seconds.