| 2268 | |
| 2269 | #[tokio::test] |
| 2270 | async fn error_for_input_exec() { |
| 2271 | // This generates an error on a call to execute. The error |
| 2272 | // should be returned and no results produced. |
| 2273 | |
| 2274 | let task_ctx = Arc::new(TaskContext::default()); |
| 2275 | let input = ErrorExec::new(); |
| 2276 | let partitioning = Partitioning::RoundRobinBatch(1); |
| 2277 | let exec = RepartitionExec::try_new(Arc::new(input), partitioning).unwrap(); |
| 2278 | |
| 2279 | // Expect that an error is returned |
| 2280 | let result_string = exec.execute(0, task_ctx).err().unwrap().to_string(); |
| 2281 | |
| 2282 | assert!( |
| 2283 | result_string.contains("ErrorExec, unsurprisingly, errored in partition 0"), |
| 2284 | "actual: {result_string}" |
| 2285 | ); |
| 2286 | } |
| 2287 | |
| 2288 | #[tokio::test] |
| 2289 | async fn repartition_with_error_in_stream() { |