Skip to content
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

Add with_tokio_runtime to HTTP stores #4040

Closed
wants to merge 5 commits into from
Closed
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
Cleanup directories
  • Loading branch information
tustvold committed Apr 9, 2023
commit 09853c52f51eb9f563001bd2d7e9b811b60b918b
9 changes: 9 additions & 0 deletions object_store/src/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ mod tests {

use super::*;

/// Deletes any directories left behind from previous tests
async fn cleanup_directories(integration: &HttpStore) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is necessary because we now run the test twice, and the directories left behind cause tests of list_with_delimiter to fail.

I have confirmed that this behaviour of returning common prefixes for empty directories is consistent with LocalFileSystem. The reason we don't run into this with LocalFileSystem is that it creates a new temp directory for each test

let result = integration.list_with_delimiter(None).await.unwrap();
for r in result.common_prefixes {
integration.delete(&r).await.unwrap();
}
}

#[test]
fn http_test() {
dotenv::dotenv().ok();
Expand All @@ -300,6 +308,7 @@ mod tests {
let (handle, shutdown) = dedicated_tokio();

let test = |integration| async move {
cleanup_directories(&integration).await;
put_get_delete_list_opts(&integration, false).await;
list_uses_directories_correctly(&integration).await;
list_with_delimiter(&integration).await;
Expand Down