Skip to content

Conversation

@Yuvraj-cyborg
Copy link
Contributor

Which issue does this PR close?

Closes #19228

Rationale for this change

This PR gates all fuzz tests behind the extended_tests feature flag, allowing developers to run a fast test suite (ideally under 1 minute) during development while still being able to run the full test suite in CI or when needed.

What changes are included in this PR?

Added #[cfg(feature = "extended_tests")] to all fuzz test modules in mod.rs. This includes the following modules:

  • aggregate_fuzz
  • distinct_count_string_fuzz
  • join_fuzz
  • merge_fuzz
  • sort_fuzz
  • sort_query_fuzz
  • topk_filter_pushdown
  • aggregation_fuzzer
  • equivalence
  • pruning
  • limit_fuzz
  • sort_preserving_repartition_fuzz
  • window_fuzz
  • Utility modules

Are these changes tested?

Without the extended_tests feature:

cargo test --package datafusion --test fuzz -- --list

This shows 0 tests.

With the extended_tests feature:

cargo test --package datafusion --test fuzz --features extended_tests -- --list

This shows all ~100+ fuzz tests.

Are there any user-facing changes?

Yes. Users can now run:

Fast test suite (default):

cargo test

or

cargo nextest run

Full test suite with fuzz tests:

cargo test --features extended_tests

or

cargo nextest run --features extended_tests

@github-actions github-actions bot added the core Core DataFusion crate label Dec 9, 2025
@Yuvraj-cyborg
Copy link
Contributor Author

@2010YOUY01 hey , does this seem good ?

Copy link
Contributor

@2010YOUY01 2010YOUY01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you! We can move forward after CI passes.

On my M4 Pro MacBook Pro, the cargo nextest run finish time goes from 2 min 30s -> 45s.

One potential follow-up to do is to rank the remaining tests running time, and deal with the slow ones, to further improve the fast test option speed.

Copy link
Contributor

@kosiew kosiew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yuvraj-cyborg

Instead of multiple #[cfg(feature = "extended_tests")], you could have simplified with one line at datafusion/core/tests/fuzz.rs

#[cfg(feature = "extended_tests")] <-----
mod fuzz_cases;

@Yuvraj-cyborg Yuvraj-cyborg force-pushed the gate-fuzz-tests-extended branch from 57fd438 to 808822c Compare December 10, 2025 06:04
@Yuvraj-cyborg
Copy link
Contributor Author

@kosiew Thanks I changed it, looks good now ??

@Yuvraj-cyborg
Copy link
Contributor Author

@2010YOUY01 @kosiew Can we have it merged !?

@2010YOUY01
Copy link
Contributor

@2010YOUY01 @kosiew Can we have it merged !?

We typically wait 24 hours between approval and merge (except for trivial PRs like typo fixes) to give others a chance to review.
Here is the reference: https://datafusion.apache.org/contributor-guide/index.html#pull-request-overview

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great idea -- thank you @Yuvraj-cyborg and @2010YOUY01

@2010YOUY01 2010YOUY01 added this pull request to the merge queue Dec 11, 2025
Merged via the queue into apache:main with commit 89a9c9d Dec 11, 2025
27 checks passed
@alamb
Copy link
Contributor

alamb commented Dec 11, 2025

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option for fast tests by gating slow tests to extended_tests feature

5 participants