This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch xuanwo/pr-7569-one-shot-baseline
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to
refs/heads/xuanwo/pr-7569-one-shot-baseline by this push:
new d19597850 test: erase the DAV probe writer at the dynamic accessor
boundary
d19597850 is described below
commit d1959785028f5ab939968b2b0b2c4d45db59c877
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))
}
}