Page MenuHomePhabricator

D4583.id14693.diff
No OneTemporary

D4583.id14693.diff

diff --git a/services/commtest/tests/blob_performance_test.rs b/services/commtest/tests/blob_performance_test.rs
--- a/services/commtest/tests/blob_performance_test.rs
+++ b/services/commtest/tests/blob_performance_test.rs
@@ -4,6 +4,8 @@
mod tools;
#[path = "./blob/put.rs"]
mod put;
+#[path = "./blob/get.rs"]
+mod get;
use std::env;
use bytesize::ByteSize;
@@ -62,6 +64,28 @@
// GET
rt.block_on(async {
println!("performing GET operations");
+ let mut handlers = vec![];
+
+ for (i, item) in blob_data.iter().enumerate() {
+ let item_cloned = item.clone();
+ let mut client_cloned = client.clone();
+ handlers.push(tokio::spawn(async move {
+ let received_sizes =
+ get::run(&mut client_cloned, &item_cloned).await.unwrap();
+ let expected_data_size =
+ item_cloned.chunks_sizes.iter().sum::<usize>();
+ let received_data_size = received_sizes.iter().sum::<usize>();
+ assert_eq!(
+ expected_data_size, received_data_size,
+ "invalid size of data for index {}, expected {}, got {}",
+ i, expected_data_size, received_data_size
+ );
+ }));
+ }
+
+ for handler in handlers {
+ handler.await.unwrap();
+ }
});
// REMOVE

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 9:09 PM (20 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2689114
Default Alt Text
D4583.id14693.diff (1 KB)

Event Timeline