diff --git a/iceberg/Cargo.toml b/iceberg/Cargo.toml index 9526a5fb0..b307470c4 100644 --- a/iceberg/Cargo.toml +++ b/iceberg/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" repository = "https://github.com/datafusion-contrib/datafusion-distributed" [features] -# Distributed worker support for the test harness. +# Integration tests and public test utilities, including distributed worker support. integration = ["datafusion-distributed/integration"] [dependencies] diff --git a/iceberg/README.md b/iceberg/README.md index 404ec9c3c..ee023743e 100644 --- a/iceberg/README.md +++ b/iceberg/README.md @@ -30,7 +30,7 @@ The default storage factory resolves `file://`, S3 (`s3://`, `s3a://`, `IcebergIntegrationOptions` to supply custom storage or an Iceberg runtime. ```bash -cargo test -p datafusion-distributed-iceberg +cargo test -p datafusion-distributed-iceberg --features integration ``` Local TPC-H Iceberg benchmarks use the separate diff --git a/iceberg/src/lib.rs b/iceberg/src/lib.rs index 655c35a08..fb35c27eb 100644 --- a/iceberg/src/lib.rs +++ b/iceberg/src/lib.rs @@ -16,6 +16,7 @@ mod table_provider; mod work_unit_feed; mod codec; +#[cfg(any(feature = "integration", test))] #[doc(hidden)] pub mod test_utils; diff --git a/iceberg/tests/desired_task_count.rs b/iceberg/tests/desired_task_count.rs index 72337309a..9ca4ee462 100644 --- a/iceberg/tests/desired_task_count.rs +++ b/iceberg/tests/desired_task_count.rs @@ -1,4 +1,4 @@ -#[cfg(test)] +#[cfg(all(feature = "integration", test))] mod tests { use datafusion::common::Result; use datafusion_distributed::DistributedExt; @@ -7,7 +7,6 @@ mod tests { }; use iceberg::spec::{Snapshot, TableMetadata}; - #[cfg(feature = "integration")] #[tokio::test] async fn executes_with_estimated_scan_tasks() -> Result<()> { // 4,480,382 bytes / 1 MB / 2 partitions rounds up to 3 tasks, not all 4 workers. diff --git a/iceberg/tests/external_table.rs b/iceberg/tests/external_table.rs index 8a3d11b33..ee6daff43 100644 --- a/iceberg/tests/external_table.rs +++ b/iceberg/tests/external_table.rs @@ -1,4 +1,4 @@ -#[cfg(test)] +#[cfg(all(feature = "integration", test))] mod tests { use datafusion::error::Result; use datafusion_distributed_iceberg::test_utils::{FIXTURE_URI, IcebergTestHarness}; diff --git a/iceberg/tests/filter_pushdown.rs b/iceberg/tests/filter_pushdown.rs index 532674aaf..5082193f0 100644 --- a/iceberg/tests/filter_pushdown.rs +++ b/iceberg/tests/filter_pushdown.rs @@ -1,4 +1,4 @@ -#[cfg(test)] +#[cfg(all(feature = "integration", test))] mod tests { use datafusion::error::Result; use datafusion_distributed_iceberg::test_utils::IcebergTestHarness; diff --git a/iceberg/tests/limit_pushdown.rs b/iceberg/tests/limit_pushdown.rs index 532845a98..f59fca4a1 100644 --- a/iceberg/tests/limit_pushdown.rs +++ b/iceberg/tests/limit_pushdown.rs @@ -1,4 +1,4 @@ -#[cfg(test)] +#[cfg(all(feature = "integration", test))] mod tests { use datafusion::error::Result; use datafusion_distributed_iceberg::test_utils::IcebergTestHarness; diff --git a/iceberg/tests/projection_pushdown.rs b/iceberg/tests/projection_pushdown.rs index 3689f4e82..2943411b1 100644 --- a/iceberg/tests/projection_pushdown.rs +++ b/iceberg/tests/projection_pushdown.rs @@ -1,4 +1,4 @@ -#[cfg(test)] +#[cfg(all(feature = "integration", test))] mod tests { use datafusion::error::Result; use datafusion_distributed_iceberg::test_utils::IcebergTestHarness; diff --git a/iceberg/tests/statistics.rs b/iceberg/tests/statistics.rs index d23239c96..3712d04b8 100644 --- a/iceberg/tests/statistics.rs +++ b/iceberg/tests/statistics.rs @@ -1,4 +1,4 @@ -#[cfg(test)] +#[cfg(all(feature = "integration", test))] mod tests { use std::error::Error; use std::sync::Arc;