Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
b-gopalswami committed Aug 9, 2024
1 parent 80cc7a6 commit e267ec3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions integration-tests/ccip-tests/smoke/ccip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ func TestSmokeCCIPReorgBelowFinality(t *testing.T) {
func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) {
t.Parallel()
t.Run("Above finality reorg in destination chain", func(t *testing.T) {
performReorgAndValidate(t, "Destination")
performAboveFinalityReorgAndValidate(t, "Destination")
})
}

Expand All @@ -917,12 +917,14 @@ func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) {
func TestSmokeCCIPReorgAboveFinalityAtSource(t *testing.T) {
t.Parallel()
t.Run("Above finality reorg in source chain", func(t *testing.T) {
performReorgAndValidate(t, "Source")
performAboveFinalityReorgAndValidate(t, "Source")
})
}

// performReorgAndValidate is to perform the above finality reorg test
func performReorgAndValidate(t *testing.T, network string) {
// performAboveFinalityReorgAndValidate is to perform the above finality reorg test
func performAboveFinalityReorgAndValidate(t *testing.T, network string) {
t.Helper()

log := logging.GetTestLogger(t)
TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke)
require.NotNil(t, TestCfg.TestGroupInput.MsgDetails.DestGasLimit)
Expand All @@ -947,10 +949,10 @@ func performReorgAndValidate(t *testing.T, network string) {
require.NoError(t, err)
logPollerName := ""
if network == "Destination" {
logPollerName = "EVM.2337.LogPoller"
logPollerName = fmt.Sprintf("EVM.%d.LogPoller", lane.DestChain.GetChainID())
rs.RunReorg(rs.DstClient, int(rs.Cfg.DstFinalityDepth)+rs.Cfg.FinalityDelta, network, 2*time.Second)
} else {
logPollerName = "EVM.1337.LogPoller"
logPollerName = fmt.Sprintf("EVM.%d.LogPoller", lane.SourceChain.GetChainID())
rs.RunReorg(rs.SrcClient, int(rs.Cfg.SrcFinalityDepth)+rs.Cfg.FinalityDelta, network, 2*time.Second)
}
clNodes := setUpOutput.Env.CLNodes
Expand Down

0 comments on commit e267ec3

Please sign in to comment.