This is an automated email from the ASF dual-hosted git repository.

comphead pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 90420861de Minor: add test for panic propagation (#12134)
90420861de is described below

commit 90420861deada38190416d5ae7e77cfa1dd2fba4
Author: Andrew Lamb <[email protected]>
AuthorDate: Sat Aug 24 17:04:42 2024 -0400

    Minor: add test for panic propagation (#12134)
---
 datafusion/common-runtime/src/common.rs | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/datafusion/common-runtime/src/common.rs 
b/datafusion/common-runtime/src/common.rs
index 698a846b48..30f7526bc0 100644
--- a/datafusion/common-runtime/src/common.rs
+++ b/datafusion/common-runtime/src/common.rs
@@ -108,4 +108,14 @@ mod tests {
             Err(e) if e.is_cancelled()
         ));
     }
+
+    #[tokio::test]
+    #[should_panic(expected = "foo")]
+    async fn panic_resume() {
+        // this should panic w/o an `unwrap`
+        SpawnedTask::spawn(async { panic!("foo") })
+            .join_unwind()
+            .await
+            .ok();
+    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to