You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by co...@apache.org on 2024/08/24 21:04:45 UTC

(datafusion) branch main updated: Minor: add test for panic propagation (#12134)

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 <an...@nerdnetworks.org>
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: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org