alamb commented on code in PR #12086:
URL: https://github.com/apache/datafusion/pull/12086#discussion_r1723924610
##########
datafusion/common-runtime/src/common.rs:
##########
@@ -75,3 +75,56 @@ impl<R: 'static> SpawnedTask<R> {
})
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ use std::{
+ future::{pending, Pending},
+ sync::{Arc, Mutex},
+ };
+
+ use tokio::runtime::Runtime;
+
+ #[tokio::test]
+ #[should_panic(
+ expected = "entered unreachable code: SpawnedTask was cancelled
unexpectedly"
Review Comment:
Nice!
##########
datafusion/common-runtime/Cargo.toml:
##########
@@ -37,3 +37,6 @@ path = "src/lib.rs"
[dependencies]
tokio = { workspace = true }
+
+[dev-dependencies]
+tokio = { version = "1.36", features = ["rt", "rt-multi-thread", "time"] }
Review Comment:
How about we just add this `rt-multi-thread` feature to the workspace
dependency here:
https://github.com/apache/datafusion/blob/e6e1eb229440591263c82bb2b913a4d5a16f9b70/Cargo.toml#L141
(it already gets used a bunch so having different feature flags just means
the crates end up recompiling a bunch unecessairly during development)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]