Skip to content

Commit

Permalink
Minor: add test for panic propagation (#12134)
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Aug 24, 2024
1 parent 696ac49 commit 9042086
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions datafusion/common-runtime/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit 9042086

Please sign in to comment.