Skip to content

Commit 0fd77e9

Browse files
Update rocketmq-remoting/src/protocol/header/update_consumer_offset_header.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 232778e commit 0fd77e9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rocketmq-remoting/src/protocol/header/update_consumer_offset_header.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,4 +472,14 @@ mod tests {
472472

473473
assert!(map.is_empty());
474474
}
475+
476+
#[test]
477+
fn response_header_deserializes_from_empty_map() {
478+
let map = std::collections::HashMap::new();
479+
480+
let header = UpdateConsumerOffsetResponseHeader::from_map(map).unwrap();
481+
let default = UpdateConsumerOffsetResponseHeader::default();
482+
483+
assert_eq!(format!("{:?}", header), format!("{:?}", default));
484+
}
475485
}

0 commit comments

Comments
 (0)