Page MenuHomePhabricator

D4275.id14077.diff
No OneTemporary

D4275.id14077.diff

diff --git a/services/commtest/tests/blob/get.rs b/services/commtest/tests/blob/get.rs
new file mode 100644
--- /dev/null
+++ b/services/commtest/tests/blob/get.rs
@@ -0,0 +1,29 @@
+#[path = "./blob_utils.rs"]
+mod blob_utils;
+#[path = "../lib/tools.rs"]
+mod tools;
+
+use tonic::Request;
+
+use crate::blob_utils::{proto::GetRequest, BlobData, BlobServiceClient};
+use crate::tools::Error;
+
+pub async fn run(
+ client: &mut BlobServiceClient<tonic::transport::Channel>,
+ blob_data: &BlobData,
+) -> Result<Vec<usize>, Error> {
+ let cloned_holder = blob_data.holder.clone();
+ println!("get {}", cloned_holder);
+
+ let response = client
+ .get(Request::new(GetRequest {
+ holder: cloned_holder,
+ }))
+ .await?;
+ let mut inbound = response.into_inner();
+ let mut sizes: Vec<usize> = Vec::new();
+ while let Some(response) = inbound.message().await? {
+ sizes.push(response.data_chunk.len());
+ }
+ Ok(sizes)
+}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 3:58 AM (17 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2682203
Default Alt Text
D4275.id14077.diff (948 B)

Event Timeline