This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 2c2e77e6b fix(tests): Create test files one by one instead of
concurrently (#3132)
2c2e77e6b is described below
commit 2c2e77e6b7e4586a6ac5c4161073233e538834f9
Author: Xuanwo <[email protected]>
AuthorDate: Tue Sep 19 15:31:30 2023 +0800
fix(tests): Create test files one by one instead of concurrently (#3132)
* fix(tests): Allow retry more times to make gdrive happy
Signed-off-by: Xuanwo <[email protected]>
* Don't create file at the same time
Signed-off-by: Xuanwo <[email protected]>
* Fix test
Signed-off-by: Xuanwo <[email protected]>
---------
Signed-off-by: Xuanwo <[email protected]>
---
core/tests/behavior/list.rs | 15 +++------------
core/tests/behavior/utils.rs | 2 +-
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/core/tests/behavior/list.rs b/core/tests/behavior/list.rs
index 492b3c7ca..65ac1b013 100644
--- a/core/tests/behavior/list.rs
+++ b/core/tests/behavior/list.rs
@@ -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![];
diff --git a/core/tests/behavior/utils.rs b/core/tests/behavior/utils.rs
index b5bd0970d..c9c9a24e3 100644
--- a/core/tests/behavior/utils.rs
+++ b/core/tests/behavior/utils.rs
@@ -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 {