Skip to content

Reduce the usage of sleep_ms() in testsuite - #17815

Merged
epage merged 6 commits into
rust-lang:masterfrom
ranger-ross:remove-sleeps
Nov 26, 2026
Merged

epage merged 6 commits into
rust-lang:masterfrom
ranger-ross:remove-sleeps

Conversation

@ranger-ross

Copy link
Copy Markdown
Member

What does this PR try to resolve?

This PR is the first of likely many that attempts to reduce the usage of sleeps/delays from the testsuite.

I used an LLM to search for usages we could remove and it found over 30 that we can removed.
This is the first batch those changes that I have properly reviewed were pretty trivial changes.

Notes to reviewers

You can see the full set of changes removals https://github.com/ranger-ross/cargo/tree/remove-sleep-ms.
I am planning to raise PRs for those as well once I pretty verify the tests remain correct after the changes.


🤖 LLM involvement: Identifying places where sleep_ms() could be removed and updating it to remove it.

r? @weihanglo

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 26, 2026
@epage
epage added this pull request to the merge queue Nov 26, 2026

@weihanglo weihanglo 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.

Thanks for the cleanup

View changes since this review

Merged via the queue into rust-lang:master with commit a579be8 Nov 26, 2026
30 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 26, 2026
ranger-ross pushed a commit to ranger-ross/cargo that referenced this pull request Nov 27, 2026
### What does this PR try to resolve?

This is a follow up on rust-lang#17815
with a second batch of removals of `sleep_ms()` calls in tests.

This batch focuses on the freshness tests.

### Notes to reviewers

This should hopefully shave about ~10 second off of our CI time. Not
much but something.
After merging this lsp says there are 29 remaining usages of `sleep_ms`.

---

🤖 LLM involvement: An LLM was used to help migrate these tests from
`sleep_ms()` to other approaches like `move_into_the_past()`.
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Nov 28, 2026
Update cargo submodule

14 commits in ae8f06eb41b8c4a534d0f280f1b9d287f45ead73..39eba940bf913a566c4763c836cbe24b9f975200
2026-11-21 04:06:35 +0000 to 2026-11-27 22:28:03 +0000
- feat(config)!: Delegate `Definition` origin to `Origin` and precedence to `Scope` (rust-lang/cargo#17822)
- Reduce the usage of `sleep_ms()` in testsuite (rust-lang/cargo#17819)
- fix(clean): Don't double count hardlinks when actually cleaning (rust-lang/cargo#17805)
- Reduce the usage of `sleep_ms()` in freshness tests (rust-lang/cargo#17816)
- fix(git): run gc in foreground to avoid race (rust-lang/cargo#17818)
- fix(script): Skip a UTF-8 BOM before parsing the frontmatter (rust-lang/cargo#17806)
- Reduce the usage of `sleep_ms()` in testsuite (rust-lang/cargo#17815)
- fix(compile): Differentiate levels of debug info  (rust-lang/cargo#17798)
- fix(profiles): line-tables-only on nightly only (rust-lang/cargo#17797)
- fix(cli): Suggest `--profile debug` on all commands that default to `dev` (rust-lang/cargo#17796)
- refactor: clarify home is cargo home (rust-lang/cargo#17790)
- refactor(config)!: various polish (rust-lang/cargo#17787)
- refactor(git): extract git backends to their own modules (rust-lang/cargo#17789)
- docs: fix typos in documentation (rust-lang/cargo#17783)

r? ghost
@rustbot rustbot added this to the 1.102.0 milestone Nov 28, 2026
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.

4 participants