Skip to content

Commit

Permalink
fix test_retry_write_fail_on_close
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorgan committed Jan 19, 2025
1 parent 546cc4c commit 81aeb13
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions core/src/layers/complete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,10 @@ where
Error::new(ErrorKind::Unexpected, "writer has been closed or aborted")
})?;

let ret = w.close().await;
let ret = w.close().await?;
self.inner = None;

ret
Ok(ret)
}

async fn abort(&mut self) -> Result<()> {
Expand Down
23 changes: 12 additions & 11 deletions core/src/layers/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -838,17 +838,18 @@ mod tests {

fn info(&self) -> Arc<AccessorInfo> {
let mut am = AccessorInfo::default();
am.set_native_capability(Capability {
read: true,
write: true,
write_can_multi: true,
delete: true,
delete_max_size: Some(10),
stat: true,
list: true,
list_with_recursive: true,
..Default::default()
});
am.set_scheme(Scheme::Custom("mock"))
.set_native_capability(Capability {
read: true,
write: true,
write_can_multi: true,
delete: true,
delete_max_size: Some(10),
stat: true,
list: true,
list_with_recursive: true,
..Default::default()
});

am.into()
}
Expand Down

0 comments on commit 81aeb13

Please sign in to comment.