Page MenuHomePhorge

D4598.1765351975.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D4598.1765351975.diff

diff --git a/services/commtest/tests/backup/pull_backup.rs b/services/commtest/tests/backup/pull_backup.rs
--- a/services/commtest/tests/backup/pull_backup.rs
+++ b/services/commtest/tests/backup/pull_backup.rs
@@ -3,8 +3,8 @@
#[path = "../lib/tools.rs"]
mod tools;
-use tonic::Request;
use std::io::{Error as IOError, ErrorKind};
+use tonic::Request;
use crate::backup_utils::{
proto::pull_backup_response::Data, proto::pull_backup_response::Data::*,
@@ -63,7 +63,10 @@
"invalid state, expected compaction, got {:?}",
state
);
- current_id = backup_id.ok_or(IOError::new(ErrorKind::Other, "backup id expected but not received"))?;
+ current_id = backup_id.ok_or(IOError::new(
+ ErrorKind::Other,
+ "backup id expected but not received",
+ ))?;
println!(
"compaction (id {}), pushing chunk (size: {})",
current_id,
@@ -76,7 +79,10 @@
state = State::Log;
}
assert_eq!(state, State::Log, "invalid state, expected compaction");
- let log_id = log_id.ok_or(IOError::new(ErrorKind::Other, "log id expected but not received"))?;
+ let log_id = log_id.ok_or(IOError::new(
+ ErrorKind::Other,
+ "log id expected but not received",
+ ))?;
if log_id != current_id {
result.log_items.push(Item::new(
log_id.clone(),
diff --git a/services/commtest/tests/backup_test.rs b/services/commtest/tests/backup_test.rs
--- a/services/commtest/tests/backup_test.rs
+++ b/services/commtest/tests/backup_test.rs
@@ -61,10 +61,7 @@
// a big item that should be placed in the S3 right away
Item::new(
String::new(),
- vec![
- *tools::GRPC_CHUNK_SIZE_LIMIT,
- *tools::GRPC_CHUNK_SIZE_LIMIT,
- ],
+ vec![*tools::GRPC_CHUNK_SIZE_LIMIT, *tools::GRPC_CHUNK_SIZE_LIMIT],
vec![
"holder0".to_string(),
"holder1".to_string(),
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
@@ -25,8 +25,10 @@
pub const GRPC_METADATA_SIZE_BYTES: usize = 5;
lazy_static! {
- pub static ref DYNAMO_DB_ITEM_SIZE_LIMIT: usize = ByteSize::kib(400).as_u64() as usize;
- pub static ref GRPC_CHUNK_SIZE_LIMIT: usize = (ByteSize::mib(4).as_u64() as usize) - GRPC_METADATA_SIZE_BYTES;
+ pub static ref DYNAMO_DB_ITEM_SIZE_LIMIT: usize =
+ ByteSize::kib(400).as_u64() as usize;
+ pub static ref GRPC_CHUNK_SIZE_LIMIT: usize =
+ (ByteSize::mib(4).as_u64() as usize) - GRPC_METADATA_SIZE_BYTES;
}
#[allow(dead_code)]

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 10, 7:32 AM (14 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5861115
Default Alt Text
D4598.1765351975.diff (2 KB)

Event Timeline