This is an automated email from the ASF dual-hosted git repository.

Xuanwo pushed a commit to branch xuanwo/pr-7569-one-shot-head
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/xuanwo/pr-7569-one-shot-head 
by this push:
     new 678336a5b test: erase the DAV probe writer at the dynamic accessor 
boundary
678336a5b is described below

commit 678336a5b078ed93a364abb0dfd0ed9df6fbb6c3
Author: Xuanwo <[email protected]>
AuthorDate: Sat Oct 31 08:11:19 2026 +0800

    test: erase the DAV probe writer at the dynamic accessor boundary
---
 integrations/dav-server/tests/single_shot_streaming.rs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/integrations/dav-server/tests/single_shot_streaming.rs 
b/integrations/dav-server/tests/single_shot_streaming.rs
index 0915340e5..e6e4fd166 100644
--- a/integrations/dav-server/tests/single_shot_streaming.rs
+++ b/integrations/dav-server/tests/single_shot_streaming.rs
@@ -57,7 +57,7 @@ impl SingleShotAccess {
 
 impl Access for SingleShotAccess {
     type Reader = oio::Reader;
-    type Writer = oio::OneShotWriter<Store>;
+    type Writer = oio::Writer;
     type Lister = oio::Lister;
     type Deleter = oio::Deleter;
     type Copier = oio::Copier;
@@ -69,7 +69,7 @@ impl Access for SingleShotAccess {
     async fn write(&self, _: &str, _: OpWrite) -> opendal::Result<(RpWrite, 
Self::Writer)> {
         Ok((
             RpWrite::new(),
-            oio::OneShotWriter::new(Store(self.stored.clone())),
+            Box::new(oio::OneShotWriter::new(Store(self.stored.clone()))),
         ))
     }
 }
@@ -78,8 +78,9 @@ struct Store(Arc<Mutex<Vec<u8>>>);
 
 impl oio::OneShotWrite for Store {
     async fn write_once(&self, buffer: Buffer) -> opendal::Result<Metadata> {
+        let size = buffer.len() as u64;
         *self.0.lock().unwrap() = buffer.to_bytes().to_vec();
-        Ok(Metadata::default())
+        Ok(Metadata::new(opendal::EntryMode::FILE).with_content_length(size))
     }
 }
 

Reply via email to