Repository navigation
test(api): exec session deadlines are checked with the monotonic clock held still - #469
Merged
Merged
Conversation
…k held still Signed-off-by: samuel mbabhazi <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 53 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 25, 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.
exec-sessions.spec.tsfails on CI now and then. It just failed #467's TypeScript job:queues the agent action for the running replica…expected an exactattachBy.Why
c4c4842 (#456) made
ExecSessions.openmeasure the time its database work takes, on the monotonic clock (performance.now()), so that freshness and deadlines are decided when they are. The test still expectedattachByto be exactly the request time plus 60 s. On a fast machine the work takes under a millisecond, which aDatedrops, so the test passed. On a slower runner it takes a millisecond or more, and the deadline moves by that much.Fix
The
opening an exec sessiontests holdperformancestill (vi.useFakeTimers({ toFake: ['performance'] })), so deadlines are exact on any machine. The test that checks a slow database already moves the clock itself, and is unchanged. No production code changes.How it was tested
expected { …(11) } to match object { …(8) }). With this change, it passes.nx typecheck lintpasses for the API.