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

fix(tests): Create test files one by one instead of concurrently #3132

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 3 additions & 12 deletions core/tests/behavior/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,9 @@ pub async fn test_list_rich_dir(op: Operator) -> Result<()> {
.map(|num| format!("test_list_rich_dir/file-{num}"))
.collect();

expected
.iter()
.map(|v| async {
op.write(v, "test_list_rich_dir")
.await
.expect("create must succeed");
})
// Collect into a FuturesUnordered.
.collect::<FuturesUnordered<_>>()
// Collect to consume all features.
.collect::<Vec<_>>()
.await;
for path in expected.iter() {
op.write(path, "test_list_rich_dir").await?;
}

let mut objects = op.with_limit(10).lister("test_list_rich_dir/").await?;
let mut actual = vec![];
Expand Down
2 changes: 1 addition & 1 deletion core/tests/behavior/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub fn init_service<B: Builder>() -> Option<Operator> {
let mut op = op
.layer(LoggingLayer::default().with_backtrace_output(true))
.layer(TimeoutLayer::new())
.layer(RetryLayer::new())
.layer(RetryLayer::new().with_max_times(4))
.finish();

if !op.info().full_capability().blocking {
Expand Down