Skip to content

fix: flaky test: sparse_blocking_count#17130

Merged
weihanglo merged 1 commit into
rust-lang:masterfrom
arlosi:flaky-test-sparse_blocking_count
Jun 23, 2026
Merged

fix: flaky test: sparse_blocking_count#17130
weihanglo merged 1 commit into
rust-lang:masterfrom
arlosi:flaky-test-sparse_blocking_count

Conversation

@arlosi

@arlosi arlosi commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

The sparse_blocking_count test is occasionally failing in rust-lang/rust CI with final ::restarting line missing.

This behavior is possible if the async http_async::Client::request function returns immediately (without a Pending for network operations).

Since the HTTP requests can finish faster than the thread that's awaiting them, there is more non-determinism now that we're using async for registry network operations. This is not an observable difference for Cargo users unless this debug logging is turned on.

This change makes the additional line optional with a ....

Even with this change, the test likely still has some value to prevent regressions with the number of resolver restarts, though it's value is less than it was with fully-deterministic debug output. In the future, it may be possible to avoid resolver restarts altogether, and then this test could be removed.

Fixes rust-lang/rust#157295

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 23, 2026
@rustbot

rustbot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, epage, weihanglo

@weihanglo weihanglo Jun 23, 2026

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.

In the future, it may be possible to avoid resolver restarts altogether, and then this test could be removed.

Do we have a way to track this?

View changes since the review

@weihanglo
weihanglo enabled auto-merge June 23, 2026 18:13
@weihanglo
weihanglo added this pull request to the merge queue Jun 23, 2026
Merged via the queue into rust-lang:master with commit ba4c0a4 Jun 23, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 23, 2026
@arlosi
arlosi deleted the flaky-test-sparse_blocking_count branch June 24, 2026 15:28
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 27, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 27, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 27, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
@rustbot rustbot added this to the 1.98.0 milestone Jun 27, 2026
faukah pushed a commit to faukah/miri that referenced this pull request Jun 28, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
pull Bot pushed a commit to Kokoro2336/rust-analyzer that referenced this pull request Jun 29, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
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.

cargo test registry::sparse_blocking_count is potentially flaky

4 participants