Skip to content

client-api: Pause time in websocket timeout tests - #3896

Merged
kim merged 1 commit into
masterfrom
kim/client-api/paused-time
Dec 18, 2025
Merged

client-api: Pause time in websocket timeout tests#3896
kim merged 1 commit into
masterfrom
kim/client-api/paused-time

Conversation

@kim

@kim kim commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

Using #[tokio::test(start_paused = true)] pauses time, yet tokio will still advance it when encountering sleeps while it has no other work to do.

This makes the tests that rely on timeouts deterministic and should prevent those tests from becoming flaky on busy machines.

Expected complexity level and risk

2

Testing

This modifies tests.
It does appear to work as described, but it can't hurt if the reviewers convince themselves that it does indeed.

Using `#[tokio::test(start_paused = true)]` pauses time, yet tokio will
still advance it when encountering `sleep`s while it has no other work
to do.

This makes the tests that rely on timeouts deterministic and should
prevent those tests from becoming flaky on busy machines.
@kim
kim requested review from bfops and gefjon December 17, 2025 18:56
@bfops

bfops commented Dec 17, 2025

Copy link
Copy Markdown
Collaborator

I trust Phoebe's review. I wouldn't know what to look for.

@kim
kim enabled auto-merge December 17, 2025 19:39
@kim
kim added this pull request to the merge queue Dec 17, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 17, 2025
@kim
kim added this pull request to the merge queue Dec 18, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 18, 2025
@kim
kim added this pull request to the merge queue Dec 18, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 18, 2025
@kim
kim added this pull request to the merge queue Dec 18, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 18, 2025
@kim
kim added this pull request to the merge queue Dec 18, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 18, 2025
@kim
kim added this pull request to the merge queue Dec 18, 2025
Merged via the queue into master with commit a2c4341 Dec 18, 2025
55 of 58 checks passed
@kim
kim deleted the kim/client-api/paused-time branch December 18, 2025 10:49
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