From 5f024e7fed8f6d436ed57d13a64e01af7e8527f5 Mon Sep 17 00:00:00 2001 From: joaoluisam Date: Tue, 24 Dec 2024 15:49:49 +0000 Subject: [PATCH] better verbose --- .../ccip-tests/actions/ccip_helpers.go | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/integration-tests/ccip-tests/actions/ccip_helpers.go b/integration-tests/ccip-tests/actions/ccip_helpers.go index 6fb2cc842c..4f50dbfe45 100644 --- a/integration-tests/ccip-tests/actions/ccip_helpers.go +++ b/integration-tests/ccip-tests/actions/ccip_helpers.go @@ -2682,15 +2682,17 @@ func (destCCIP *DestCCIPModule) AssertMessageContentMatch( // Compare the received content with the expected content if string(receivedContent) == string(expectedContent) { lggr.Info(). - Str("MessageID", messageID). - Msg("Message content matches the expected content") + Str("MessageID 0x%x", messageID). + Str("Received Content", string(receivedContent)). + Str("Expected Content", string(expectedContent)). + Msg("Message received and its content matches the sent content") return nil } lggr.Warn(). - Str("MessageID", messageID). - Str("ReceivedContent", string(receivedContent)). - Str("ExpectedContent", string(expectedContent)). + Str("MessageID 0x%x", messageID). + Str("Received Content", string(receivedContent)). + Str("Expected Content", string(expectedContent)). Msg("Message content mismatch") case <-timer.C: @@ -3569,21 +3571,24 @@ func (lane *CCIPLane) StartEventWatchers() error { messageReceivedSub := event.Resubscribe(DefaultResubscriptionTimeout, func(_ context.Context) (event.Subscription, error) { sub, err := lane.Dest.ReceiverDapp.WatchMessageReceived(nil, messageReceivedEvent) if err != nil { - log.Error().Err(err).Msg("error in subscribing to messageReceivedEvent") + log.Error().Err(err).Msg("error in subscribing to message received event") } return sub, err }) if messageReceivedSub == nil { - return fmt.Errorf("failed to subscribe to messageReceivedEvent") + return fmt.Errorf("failed to subscribe to message received event") } go func(sub event.Subscription) { defer sub.Unsubscribe() for { select { case e := <-messageReceivedEvent: - log.Info().Msgf("messageReceivedEvent received with data: %+v", e) messageId := string(e.MessageId[:]) - messageContent := e.Data + messageContent := string(e.Data) + messageSender := string(e.Sender[:]) + log.Info().Msgf("Message event received for message id: 0x%x", messageId) + log.Info().Msgf("Message event received with content: %+v", messageContent) + log.Info().Msgf("Message event received with sender: 0x%x", messageSender[len(messageSender)-20:]) lane.Dest.MessageReceivedWatcher.Store(messageId, messageContent) case <-lane.Context.Done(): return