diff --git a/services/commtest/tests/lib/tools.rs b/services/commtest/tests/lib/tools.rs --- a/services/commtest/tests/lib/tools.rs +++ b/services/commtest/tests/lib/tools.rs @@ -24,5 +24,13 @@ TonicStatus(tonic::Status), } +#[allow(dead_code)] +pub const GRPC_METADATA_SIZE: usize = 5; + +#[allow(dead_code)] +pub fn get_grpc_chunk_size_limit() -> usize { + (ByteSize::mib(4).as_u64() as usize) - GRPC_METADATA_SIZE +} + #[allow(dead_code)] pub const ATTACHMENT_DELIMITER: char = ';';