Remove a flaky got_timeout assert from two channel tests#153534
Remove a flaky got_timeout assert from two channel tests#153534Zalathar wants to merge 1 commit intorust-lang:mainfrom
got_timeout assert from two channel tests#153534Conversation
In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
| }); | ||
|
|
||
| let mut recv_count = 0; | ||
| let mut got_timeout = false; |
There was a problem hiding this comment.
I wonder why not just make the sender thread have a while loop on a shared atomic value (like an Arc<AtomicBool>) that yields itself through thread::yield_now? Or I'm wondering if we could also use a shared Condvar that waits in the sender thread and the receiver thread is the one that sends a notification? That way we can guarantee that our receiver thread experiences a RecvTimeoutError::Timeout error after 10 ms and either set the atomic value to a state that the while loop from the sender thread will stop looping on or the sender thread just resumes its iteration in the for loop upon receiving a notification.
|
It's not very clear to me what the intent of the tests here was. They were added in #33748 with the original recv_timeout impl, but I don't see any comments there on why we thought this test was particularly useful. I think I'd also be happy to r+ a full removal, but just removing the expectation of seeing a timeout seems OK for now. We do have a couple tests that verify recv_timeout does in fact timeout (though mostly with empty channels...), so I think we'll catch at least that kind of bug regardless. @bors r+ |
…lacrum Remove a flaky `got_timeout` assert from two channel tests In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs. One of these tests actually failed in rust-lang#153387 (comment). Earlier failures: - rust-lang#150365 (comment) - rust-lang#147775 (comment) --- - Prior art: rust-lang#152878
…uwer Rollup of 7 pull requests Successful merges: - #122668 (Add APIs for dealing with titlecase) - #153312 (Packages as namespaces part 1) - #153534 (Remove a flaky `got_timeout` assert from two channel tests) - #154094 (add neon load/store assembly test) - #154175 (Add new alias for Guillaume Gomez email address) - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl) - #154188 (Update the tracking issue for #[diagnostic::on_move])
…lacrum Remove a flaky `got_timeout` assert from two channel tests In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs. One of these tests actually failed in rust-lang#153387 (comment). Earlier failures: - rust-lang#150365 (comment) - rust-lang#147775 (comment) --- - Prior art: rust-lang#152878
Rollup of 6 pull requests Successful merges: - #122668 (Add APIs for dealing with titlecase) - #153312 (Packages as namespaces part 1) - #153534 (Remove a flaky `got_timeout` assert from two channel tests) - #154175 (Add new alias for Guillaume Gomez email address) - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl) - #154188 (Update the tracking issue for #[diagnostic::on_move])
…lacrum Remove a flaky `got_timeout` assert from two channel tests In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs. One of these tests actually failed in rust-lang#153387 (comment). Earlier failures: - rust-lang#150365 (comment) - rust-lang#147775 (comment) --- - Prior art: rust-lang#152878
Rollup of 7 pull requests Successful merges: - #122668 (Add APIs for dealing with titlecase) - #153312 (Packages as namespaces part 1) - #153534 (Remove a flaky `got_timeout` assert from two channel tests) - #154175 (Add new alias for Guillaume Gomez email address) - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl) - #154188 (Update the tracking issue for #[diagnostic::on_move]) - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
…lacrum Remove a flaky `got_timeout` assert from two channel tests In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs. One of these tests actually failed in rust-lang#153387 (comment). Earlier failures: - rust-lang#150365 (comment) - rust-lang#147775 (comment) --- - Prior art: rust-lang#152878
Rollup of 9 pull requests Successful merges: - #122668 (Add APIs for dealing with titlecase) - #153312 (Packages as namespaces part 1) - #153534 (Remove a flaky `got_timeout` assert from two channel tests) - #153582 (Simplify find_attr! for HirId usage) - #154174 (allow `incomplete_features` in most UI tests) - #154175 (Add new alias for Guillaume Gomez email address) - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl) - #154188 (Update the tracking issue for #[diagnostic::on_move]) - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.
One of these tests actually failed in #153387 (comment).
Earlier failures:
oneshottests #152878