Xuanwo commented on code in PR #2096:
URL: 
https://github.com/apache/incubator-opendal/pull/2096#discussion_r1174778388


##########
core/tests/behavior/list.rs:
##########
@@ -278,6 +280,49 @@ pub async fn test_list_dir_with_file_path(op: Operator) -> 
Result<()> {
     Ok(())
 }
 
+pub async fn test_list_with_start_after(op: Operator) -> Result<()> {
+    if !(op.info().capability().list_with_start_after) {
+        return Ok(());
+    }
+
+    let dir = "test_list_with_start_after/";
+    op.create_dir(dir).await?;
+
+    vec!["file-0", "file-1", "file-2", "file-3", "file-4", "file-5"]
+        .iter()
+        .map(|name| format!("{dir}{name}"))
+        .collect::<Vec<String>>()
+        .iter()
+        .map(|name| async {
+            op.write(name, "content")
+                .await
+                .expect("create must succeed");
+        })
+        .collect::<FuturesUnordered<_>>()
+        .collect::<Vec<_>>()
+        .await;
+
+    let option = OpList::new().with_start_after("file-2");

Review Comment:
   And its better to generate random file like `file-2-{uuid}` to avoid 
services pass the test by chance.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to