Skip to content

Commit fe689cb

Browse files
committed
add a test for the streaming
1 parent a51cdba commit fe689cb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/walrus-e2e-tests/tests/test_client.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use reqwest::Url;
2727
#[cfg(msim)]
2828
use sui_macros::{clear_fail_point, register_fail_point_if};
2929
use sui_types::base_types::{SUI_ADDRESS_LENGTH, SuiAddress};
30-
use tokio::sync::Mutex;
30+
use tokio::{sync::Mutex, time::Instant};
3131
use tokio_stream::StreamExt;
3232
use walrus_core::{
3333
BlobId,
@@ -3031,6 +3031,7 @@ async fn test_streaming_blob() -> TestResult {
30313031
let arc_client = Arc::new(read_client);
30323032

30333033
// Call start_streaming_blob directly
3034+
let start = Instant::now();
30343035
let (stream, returned_size) =
30353036
start_streaming_blob(arc_client, streaming_config, blob_id).await?;
30363037

@@ -3046,6 +3047,11 @@ async fn test_streaming_blob() -> TestResult {
30463047
.collect()
30473048
.await;
30483049

3050+
tracing::info!(
3051+
"Collected {} chunks in {:?}",
3052+
collected.len(),
3053+
start.elapsed()
3054+
);
30493055
// Concatenate all chunks
30503056
let streamed_data: Vec<u8> = collected.into_iter().flat_map(|b| b.to_vec()).collect();
30513057

0 commit comments

Comments
 (0)