You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "fakerpawnno1 (via GitHub)" <gi...@apache.org> on 2023/05/31 09:12:38 UTC

[GitHub] [rocketmq-e2e] fakerpawnno1 commented on a diff in pull request #32: Add message test

fakerpawnno1 commented on code in PR #32:
URL: https://github.com/apache/rocketmq-e2e/pull/32#discussion_r1211343746


##########
golang/utils/CheckUtils.go:
##########
@@ -75,3 +76,16 @@ func CheckFIFOMsgsWithMsgId(t *testing.T, sendMsgsCollector *SendMsgsCollector,
 func CheckTransactionMsgsWithMsgId(t *testing.T, sendMsgsCollector *SendMsgsCollector, recvMsgsCollector *RecvMsgsCollector) {
 	CheckMsgsWithMsgId(t, sendMsgsCollector, recvMsgsCollector)
 }
+
+func CheckMsgsWithMsgBody(t *testing.T, sendMsgsCollector *SendMsgsCollector, recvMsgsCollector *RecvMsgsCollector) {
+	var sendMsg string
+	var recvMsg string
+	for _, sed := range sendMsgsCollector.SendMsgs {
+		sendMsg = string(sed.Body)
+	}
+	for _, recv := range recvMsgsCollector.RecvMsgViews {
+		recvMsg = string(recv.GetBody())
+	}
+
+	assert.Equal(t, sendMsg, recvMsg)

Review Comment:
   check逻辑是否合理?看起来好像只check了最后一条消息body



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org