Problem
Test for utility LocalPollAdapter, util::local_poll_adapter::tests::deferred_success is failing multiple times on CI but re-running doesn't (or maybe sometimes does) reproduce the failure.
Recently failed runs:
Possible cause is that short waiting time here might be causing Future to immediately returning Ready:
|
futures_timer::Delay::new(Duration::from_millis(1)).await |
and thus poll() returns Ready.
|
// Attempt to run the future immediately. If it has no `await` yields, |
|
// it will return here. |
|
if let Some((k, v)) = (&mut future).now_or_never() { |
|
if let Ok(success) = &v { |
|
// Only cache successful results. |
|
self.cache.insert(k, Poll::Ready(Ok(success.clone()))); |
|
} |
|
return Poll::Ready(v); |
|
} |
Steps
No response
Possible Solution(s)
No response
Notes
I can't reproduce this on local.
#!/bin/bash
set -xe
for i in `seq 100`
do
echo test $i
cargo test util::local_poll_adapter::tests::deferred_success
done
Version
CI, and local:
cargo 1.97.0-nightly (eb94155a9 2026-04-09)
release: 1.97.0-nightly
commit-hash: eb94155a9a60943bd7b1cb04abec42f5d0de6ddc
commit-date: 2026-04-09
host: x86_64-unknown-linux-gnu
libgit2: 1.9.2 (sys:0.20.4 vendored)
libcurl: 8.19.0-DEV (sys:0.4.87+curl-8.19.0 vendored ssl:OpenSSL/3.5.4)
ssl: OpenSSL 3.5.4 30 Sep 2025
os: Arch Linux [64-bit]
Problem
Test for utility
LocalPollAdapter,util::local_poll_adapter::tests::deferred_successis failing multiple times on CI but re-running doesn't (or maybe sometimes does) reproduce the failure.Recently failed runs:
Possible cause is that short waiting time here might be causing Future to immediately returning
Ready:cargo/src/cargo/util/local_poll_adapter.rs
Line 114 in 6ea2e71
and thus
poll()returnsReady.cargo/src/cargo/util/local_poll_adapter.rs
Lines 67 to 75 in 6ea2e71
Steps
No response
Possible Solution(s)
No response
Notes
I can't reproduce this on local.
Version