-
Notifications
You must be signed in to change notification settings - Fork 119
test: One liner to skip read_table_version_hdfs #1428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
|
|
||
| #[tokio::test] | ||
| #[ignore = "Skipping HDFS integration test"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check to CI to see if there is anyplace where this test is not being skipped, so it can be run explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack.
1/ Validated the CI
https://github.com/delta-io/delta-kernel-rs/blob/5058bce725f5fce39e5f33f09ec9445cdd0ea7eb/.github/workflows/build.yml#L131
2/ IIUC the test can be explicitly run by requesting the ignored test to be run with the apt feature flag set. Validated
➜ delta-kernel-rs git:(skiptest) cargo test --features integration-test --test hdfs -- --ignored --list
Compiling parquet v56.2.0
Compiling delta_kernel v0.16.0 (/Users/sanuj.basu/KernelSource/delta-kernel-rs/kernel)
Compiling test_utils v0.16.0 (/Users/sanuj.basu/KernelSource/delta-kernel-rs/test-utils)
Finished `test` profile [unoptimized + debuginfo] target(s) in 6.30s
Running tests/hdfs.rs (target/debug/deps/hdfs-bdd8c212ac20f512)
read_table_version_hdfs: test
delta-kernel-rs git:(skiptest) cargo test --features integration-test --test hdfs -- --include-ignored
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s
Running tests/hdfs.rs (target/debug/deps/hdfs-bdd8c212ac20f512)
running 1 test
test read_table_version_hdfs ... FAILED
failures:
---- read_table_version_hdfs stdout ----
thread 'read_table_version_hdfs' panicked at /Users/sanuj.basu/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hdfs-native-0.12.3/src/minidfs.rs:59:37:
Failed to find mvn executable: CannotFindBinaryPath
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
read_table_version_hdfs
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
error: test failed, to rerun pass `-p delta_kernel --test hdfs`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicklan should we just delete this test if we don't have CI coverage for it? Are there plans to add CI coverage?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1428 +/- ##
=======================================
Coverage 84.85% 84.85%
=======================================
Files 119 119
Lines 30961 30961
Branches 30961 30961
=======================================
Hits 26271 26271
Misses 3408 3408
Partials 1282 1282 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should already be skipped unless you set the integration-test feature flag (we could maybe give it a better name)
Specifically the line at the top: #![cfg(all(feature = "integration-test", not(target_os = "windows")))] should skip the whole file unless the feature is on.
What command where you running such that you were getting issues?
|
I was running |
Ahh yeah, if you do |
Seems like it was skipped in the CI file here delta-kernel-rs/.github/workflows/build.yml Line 131 in 5058bce
Putting the ignored in the test makes it more visible and makes sure new contributors do not trip on it right? Does that sound reasonable? I followed the OSS README which suggests we run |
---- read_table_version_hdfs stdout ---- thread 'read_table_version_hdfs' panicked at /Users/sanuj.basu/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ hdfs-native-0.12.3/src/minidfs.rs:59:37: Failed to find mvn executable: CannotFindBinaryPath note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Solution ======== Added the #[ignore = "Skipping HDFS integration test"] attribute to test read_table_version_hdfs to skip the test temporarily. Testing: ======== running 1 test test read_table_version_hdfs ... ignored, Skipping HDFS integration test skipped as expected
Minor README update removing a bad rust analyzer config. Testing ======= Validation using the markdown mode in vscode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
What changes are proposed in this pull request?
This PR adds an `#[ignore]` attribute to the `read_table_version_hdfs` test to skip it when the Maven executable is not available on the system.
Problem:
The HDFS integration test was failing in environments where Maven is not installed:
Solution:
Added the `#[ignore = "Skipping HDFS integration test"]` attribute to the `read_table_version_hdfs` test function. This allows the test to be skipped by default while still being available to run explicitly when needed.
How was this change tested?
Verified that the test is properly skipped:
The test can still be run explicitly with:
cargo test --features integration-test --test hdfs -- --include-ignored