-
Notifications
You must be signed in to change notification settings - Fork 383
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
[#6131] feat (gvfs-fuse): Add integration test framework of gvfs-fuse #6160
Conversation
run: | | ||
./gradlew :clients:filesystem-fuse:build -PenableFuse=true | ||
- name: Integration test | ||
run: | | ||
./gradlew bundles:aws-bundle:build -x :clients:client-python:build compileDistribution -x test -x web -PjdkVersion=${{ matrix.java-version }} |
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.
it's hard to use, use make prepare-it-env
?
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.
It's not good to let make call gradle again.
Currently, the integration test module does not automatically build the package, right?
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.
yes, the current IT doesn't automatically build the package, but here you depends on bundles:aws-bundle:build
, I wonder whether you could make it auto dependents. and There are separate actions in Gravitino IT, seems better make rust client keep consistent with it.
- name: Package Gravitino
if: ${{ inputs.test-mode == 'deploy' }}
run: |
./gradlew compileDistribution -x test -PjdkVersion=${{ inputs.java-version }}
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.
fix
@@ -334,13 +334,21 @@ impl<T: PathFileSystem> RawFileSystem for DefaultRawFileSystem<T> { | |||
file.flush().await | |||
} | |||
|
|||
async fn close_file(&self, _file_id: u64, fh: u64) -> Result<()> { | |||
async fn close_file(&self, file_id: u64, fh: u64) -> Result<()> { | |||
let file_entry = self.get_file_entry(file_id).await; |
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.
why adding this?
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.
Check if the file has been deleted.
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.
If there is no file entry, is it expected not closing the open file?
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.
Yes, closing deleted file may cause bugs.
This fix is not good. Add the todo comments to handle that case.
|
||
#[tokio::test] | ||
async fn s3_ut_test_s3_stat() { | ||
test_enable_with!(RUN_TEST_WITH_S3); |
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.
this seems hacks, could you refer other rust projects for more general way to control the tests?
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 can’t find a good way to mark the test tags and run them.
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.
try using this?
#[cfg(feature = "ENABLE_S3_TEST")]
, after using this macro, seems we could remove s3_ut
prefix too.
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.
This is generally used to control whether a module participates in compilation, and I haven't seen any projects using it to control tests. People familiar with Rust might find this confusing, right?
It also cannot filter out tests that do not have feature = "ENABLE_S3_TEST" enabled.
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.
There have a lib can mark tags for the testers. but it can not work with #[tokio::test]
https://docs.rs/tagrs/latest/tagrs/
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.
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.
The storage-s3
feature is used to enable that functionality for all code, not just for testing.
./gradlew build -x :clients:client-python:build -x test -x web -PjdkVersion=${{ matrix.java-version }} | ||
./gradlew compileDistribution -x :clients:client-python:build -x test -x web -PjdkVersion=${{ matrix.java-version }} |
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 move this two line to the Build and test Gvfs-fuse
may be more proper
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.
The one above builds gvfs-fuse
, and the below builds the Gravitino server needed for testing.
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.
OK
LGTM, @yuqi1129 any other comments? |
I have reviewed again and no further comments. |
…#6160) ### What changes were proposed in this pull request? Add integration test framework of gvfs-fuse Integrate LocalStack into the gvfs-fuse integration test Add ci pipeline for integration test ### Why are the changes needed? Fix: #6131 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? IT
What changes were proposed in this pull request?
Add integration test framework of gvfs-fuse
Integrate LocalStack into the gvfs-fuse integration test
Add ci pipeline for integration test
Why are the changes needed?
Fix: #6131
Does this PR introduce any user-facing change?
No
How was this patch tested?
IT