Skip to content

Commit

Permalink
fix log
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoluisam committed Dec 26, 2024
1 parent c1b8ed4 commit a0c37b8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions integration-tests/ccip-tests/actions/ccip_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2654,7 +2654,7 @@ func (destCCIP *DestCCIPModule) AssertMessageContentMatch(
) error {
fmt.Println(reqStat)
lggr.Info().
Str("MsgID", fmt.Sprintf("0x%x", messageID)).
Str("MsgID", fmt.Sprintf("0x%x", string(messageID))).
Str("Timeout", timeout.String()).
Msg("Waiting for message content to match")
timer := time.NewTimer(timeout)
Expand All @@ -2674,23 +2674,23 @@ func (destCCIP *DestCCIPModule) AssertMessageContentMatch(
receivedContent, ok := value.([]uint8)
if !ok {
lggr.Warn().
Str("MsgID", fmt.Sprintf("0x%x", messageID)).
Str("MsgID", fmt.Sprintf("0x%x", string(messageID))).
Msg("Invalid content type in MessageReceivedWatcher")
continue
}

// Compare the received content with the expected content
if string(receivedContent) == string(expectedContent) {
lggr.Info().
Str("MessageID 0x%x", messageID).
Str("MessageID 0x%x", string(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 0x%x", messageID).
Str("MessageID 0x%x", string(messageID)).
Str("Received Content", string(receivedContent)).
Str("Expected Content", string(expectedContent)).
Msg("Message content mismatch")
Expand All @@ -2699,15 +2699,15 @@ func (destCCIP *DestCCIPModule) AssertMessageContentMatch(
// Handle timeout with potential connection issue recovery
if destCCIP.Common.IsConnectionRestoredRecently != nil && !destCCIP.Common.IsConnectionRestoredRecently.Load() {
if resetTimerCount > 2 {
return fmt.Errorf("possible RPC issue - message content did not match for MessageID 0x%x", messageID)
return fmt.Errorf("possible RPC issue - message content did not match for MessageID 0x%x", string(messageID))
}
timer.Reset(timeout)
resetTimerCount++
lggr.Info().Int("count of reset", resetTimerCount).Msg("Resetting timer to validate message content match")
continue
}

return fmt.Errorf("timeout - message was not received or content did not match for MessageID 0x%x", messageID)
return fmt.Errorf("timeout - message was not received or content did not match for MessageID 0x%x", string(messageID))
}
}
}
Expand Down

0 comments on commit a0c37b8

Please sign in to comment.