From 2ed238746f9e486fc2095fccb3ef634fb955f09d Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Thu, 11 Jul 2024 16:43:14 -0400 Subject: [PATCH] debug --- .../ccip-tests/testsetups/ccip.go | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/integration-tests/ccip-tests/testsetups/ccip.go b/integration-tests/ccip-tests/testsetups/ccip.go index 0d0396507e..2f889129b8 100644 --- a/integration-tests/ccip-tests/testsetups/ccip.go +++ b/integration-tests/ccip-tests/testsetups/ccip.go @@ -968,10 +968,15 @@ func (o *CCIPTestSetUpOutputs) CheckGasUpdateTransaction(lggr *zerolog.Logger) e } } } + lggr.Info().Interface("Tx hashes", transactions).Msg("Checked Gas Update Transactions") // when leader lane setup is enabled, number of transaction should match the number of leader lanes defined. if len(transactions) != len(o.Cfg.LeaderLanes) { - return fmt.Errorf("transaction count %d should match the number of leader lanes %d", - len(transactions), len(o.Cfg.LeaderLanes)) + lggr.Warn(). + Int("Tx hashes", len(transactions)). + Int("Leader lanes count", len(o.Cfg.LeaderLanes)). + Msg("Checked Gas Update transactions count doesn't match") + //return fmt.Errorf("transaction count %d should match the number of leader lanes %d", + // len(transactions), len(o.Cfg.LeaderLanes)) } else { lggr.Info(). Int("Tx hashes", len(transactions)). @@ -980,10 +985,16 @@ func (o *CCIPTestSetUpOutputs) CheckGasUpdateTransaction(lggr *zerolog.Logger) e } // each transaction should have number of network - 1 chain selectors and corresponding gas values. // Say we have 3 networks, then we have expected every transaction to have 2 chain selectors + failed := false for k, v := range transactions { if len(v) != o.Cfg.TestGroupInput.NoOfNetworks-1 { - return fmt.Errorf("number of chain selector count %d should match the number of "+ - "networks minus one %d", len(v), o.Cfg.TestGroupInput.NoOfNetworks-1) + lggr.Warn(). + Str("Tx hash", k). + Interface("Chain selectors", v). + Int("Event emitted count", len(v)). + Msg("Checked Gas Update transaction events count doesn't match") + failed = true + } else { lggr.Info(). Str("Tx hash", k). @@ -992,7 +1003,10 @@ func (o *CCIPTestSetUpOutputs) CheckGasUpdateTransaction(lggr *zerolog.Logger) e Msg("Checked Gas Update transaction events count") } } - lggr.Info().Interface("Tx hashes", transactions).Msg("Checked Gas Update Transactions") + if failed { + return fmt.Errorf("number of chain selector count should match the number of " + + "networks minus one ") + } return nil }