Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions rocketmq-broker/src/processor/end_transaction_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,6 @@ mod tests {
.as_ref()
);
assert_eq!(msg_inner.message_ext_inner.sys_flag, msg_ext.sys_flag);
/* assert_eq!(
msg_inner.tags_code,
MessageExtBrokerInner::tags_string2tags_code(
&TopicFilterType::SingleTag,
msg_ext.get_tags().as_ref().unwrap()
)
);*/
assert_eq!(msg_inner.get_properties(), msg_ext.get_properties());
assert_eq!(
msg_inner.properties_string,
Expand All @@ -555,7 +548,6 @@ mod tests {
#[test]
fn end_message_transaction_with_empty_body() {
let mut msg_ext = MessageExt::default();
//msg_ext.set_body(None);
let msg_inner = end_message_transaction(&mut msg_ext);
assert!(!msg_inner.get_body().is_some_and(|b| b.is_empty()));
}
Comment on lines 549 to 553
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end_message_transaction_with_empty_body currently constructs a default MessageExt (which has body == None) and then asserts !msg_inner.get_body().is_some_and(|b| b.is_empty()), which will always pass when the body is None. This makes the test effectively non-assertive for the “empty body” scenario. Consider either renaming the test to reflect the None body case, or explicitly setting an empty body (e.g., Bytes::new()) and asserting the intended behavior for empty-but-present bodies.

Copilot uses AI. Check for mistakes.
Expand Down
Loading