()
| 2865 | |
| 2866 | #[tokio::test] |
| 2867 | async fn cleanup_executes_cleanup_queries() { |
| 2868 | let mut benchmark = parse_benchmark( |
| 2869 | r#" |
| 2870 | run |
| 2871 | SELECT 1; |
| 2872 | |
| 2873 | cleanup |
| 2874 | CREATE TABLE cleanup_marker_a AS SELECT 7 AS value; |
| 2875 | |
| 2876 | cleanup |
| 2877 | CREATE TABLE cleanup_marker_b AS SELECT value + 1 AS value FROM cleanup_marker_a; |
| 2878 | "#, |
| 2879 | ) |
| 2880 | .await |
| 2881 | .expect("benchmark should parse"); |
| 2882 | let ctx = SessionContext::new(); |
| 2883 | |
| 2884 | benchmark.cleanup(&ctx).await.expect("cleanup should run"); |
| 2885 | |
| 2886 | let rows = ctx |
| 2887 | .sql("SELECT value FROM cleanup_marker_b") |
| 2888 | .await |
| 2889 | .expect("query should plan") |
| 2890 | .collect() |
| 2891 | .await |
| 2892 | .expect("query should run"); |
| 2893 | assert_eq!(format_record_batches(&rows).unwrap(), vec![vec!["8"]]); |
| 2894 | } |
| 2895 | |
| 2896 | #[tokio::test] |
| 2897 | async fn cleanup_propagates_query_failures() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…