Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review: move spill_pool_fuzz implementation to datafusion-fuzz crage
  • Loading branch information
2010YOUY01 committed Nov 4, 2026
commit dd6f892d874447bc38a7f718f5e00484363cef2a
6 changes: 6 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions datafusion/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ autotests = false
workspace = true

[features]
extended_tests = ["datafusion-physical-plan/test_utils"]
extended_tests = []

[dev-dependencies]
arrow = { workspace = true }
bytes = { workspace = true }
datafusion-common = { workspace = true }
datafusion-execution = { workspace = true }
datafusion-physical-plan = { workspace = true }
futures = { workspace = true }
parking_lot = { workspace = true }
rand = { workspace = true }
test-utils = { path = "../../test-utils" }
tokio = { workspace = true, features = ["rt-multi-thread"] }
tokio = { workspace = true, features = ["rt-multi-thread", "time"] }

[[test]]
name = "fuzz"
Expand Down
10 changes: 5 additions & 5 deletions datafusion/fuzz/tests/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ async fn fuzz_tests() -> Result<()> {
async fn run_suites<'a>(suites: impl IntoIterator<Item = Suite<'a>>) -> Result<()> {
for suite in suites {
eprintln!("Running fuzz suite: {}", suite.name);
suite.campaign.await?;
suite.run.await?;
}
Ok(())
}

/// Erase only a campaign's future, retaining each adapter's concrete dataset
/// type. Borrowed fixtures and futures that are not `Send` remain supported.
/// Wrapper for one fuzzing test suite
struct Suite<'a> {
name: &'a str,
campaign: Pin<Box<dyn Future<Output = Result<()>> + 'a>>,
/// Run the test suite. Report an error on failure or execution statistics on success.
run: Pin<Box<dyn Future<Output = Result<()>> + 'a>>,
}

impl<'a> Suite<'a> {
fn new<T: FuzzTest>(test: &'a T, config: RunConfig) -> Self {
Self {
name: test.name(),
campaign: Box::pin(async move {
run: Box::pin(async move {
let stats = run(test, config).await?;
eprintln!(
"Fuzz suite {}: {} cases, {} datasets, {:?}",
Expand Down
2 changes: 1 addition & 1 deletion datafusion/fuzz/tests/suites/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// SPDX-FileCopyrightText: See the NOTICE file distributed with this work for additional information regarding copyright ownership
// SPDX-FileContributor: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements

//! Adapters for component-local fuzz scenarios.
//! Implementation for fuzz test cases.

pub(crate) mod spill_pool;
Loading
Loading