MCPcopy Create free account
hub / github.com/apache/datafusion / verify_rejects_malformed_result_file

Function verify_rejects_malformed_result_file

benchmarks/src/sql_benchmark.rs:3348–3363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3346
3347 #[tokio::test]
3348 async fn verify_rejects_malformed_result_file() {
3349 let temp_dir = tempdir().expect("failed to create benchmark test directory");
3350 let result_path = temp_dir.path().join("malformed_result.csv");
3351 fs::write(&result_path, [0xff]).expect("failed to write malformed result file");
3352 let mut benchmark = parse_benchmark(&format!(
3353 "result {}\n\nrun\nSELECT 1 AS value\n",
3354 result_path.display()
3355 ))
3356 .await
3357 .expect("benchmark should parse");
3358 let ctx = SessionContext::new();
3359
3360 benchmark.run(&ctx, true).await.expect("run should succeed");
3361
3362 assert_result_error_contains(benchmark.verify(&ctx).await, "CSV");
3363 }
3364
3365 #[tokio::test]
3366 async fn verify_executes_result_query_instead_of_last_results() {

Callers

nothing calls this directly

Calls 7

parse_benchmarkFunction · 0.85
newFunction · 0.85
joinMethod · 0.45
pathMethod · 0.45
runMethod · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…