Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3399239
D4556.id14802.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D4556.id14802.diff
View Options
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
@@ -68,7 +68,7 @@
"backup id expected but not received",
))?;
println!(
- "compaction (id {}), pushing chunk (size: {})",
+ "compaction (id {}), pulling chunk (size: {})",
current_id,
chunk.len()
);
@@ -78,7 +78,12 @@
if state == State::Compaction {
state = State::Log;
}
- assert_eq!(state, State::Log, "invalid state, expected compaction");
+ assert_eq!(
+ state,
+ State::Log,
+ "invalid state, expected log, got {:?}",
+ state
+ );
let log_id = log_id.ok_or(IOError::new(
ErrorKind::Other,
"log id expected but not received",
@@ -98,34 +103,34 @@
println!("log (id {}) chunk size {}", current_id, chunk.len());
}
- Some(AttachmentHolders(holders)) => {
- let holders_split: Vec<&str> =
- holders.split(ATTACHMENT_DELIMITER).collect();
- if state == State::Compaction {
+ None => {}
+ }
+ if let Some(holders) = response.attachment_holders {
+ let holders_split: Vec<&str> =
+ holders.split(ATTACHMENT_DELIMITER).collect();
+ if state == State::Compaction {
+ for holder in holders_split {
+ if holder.len() == 0 {
+ continue;
+ }
println!("attachments for the backup: {}", holders);
- for holder in holders_split {
- if holder.len() == 0 {
- continue;
- }
- result
- .backup_item
- .attachments_holders
- .push(holder.to_string());
+ result
+ .backup_item
+ .attachments_holders
+ .push(holder.to_string());
+ }
+ } else if state == State::Log {
+ for holder in holders_split {
+ if holder.len() == 0 {
+ continue;
}
- } else if state == State::Log {
println!("attachments for the log: {}", holders);
- for holder in holders_split {
- if holder.len() == 0 {
- continue;
- }
- let log_items_size = result.log_items.len() - 1;
- result.log_items[log_items_size]
- .attachments_holders
- .push(holder.to_string())
- }
+ let log_items_size = result.log_items.len() - 1;
+ result.log_items[log_items_size]
+ .attachments_holders
+ .push(holder.to_string())
}
}
- None => {}
}
}
Ok(result)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 2:34 AM (21 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2609332
Default Alt Text
D4556.id14802.diff (2 KB)
Attached To
Mode
D4556: [services] Backup - pull backup - change tests
Attached
Detach File
Event Timeline
Log In to Comment