From 1335a0eefb1256649c073f6c56e106ba46942c87 Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Wed, 27 Nov 2024 11:36:58 -0500 Subject: [PATCH 1/4] CCIP-4401: Skipping flaky reorg test --- integration-tests/ccip-tests/smoke/ccip_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/integration-tests/ccip-tests/smoke/ccip_test.go b/integration-tests/ccip-tests/smoke/ccip_test.go index 0dab46c5a25..4ad2ede58c7 100644 --- a/integration-tests/ccip-tests/smoke/ccip_test.go +++ b/integration-tests/ccip-tests/smoke/ccip_test.go @@ -889,6 +889,7 @@ func TestSmokeCCIPReorgBelowFinality(t *testing.T) { // doesn't go through and verifies f+1 nodes is able to detect reorg. // Note: LogPollInterval interval is set as 1s to detect the reorg immediately func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) { + t.Skip("Skipping as it is flaying. Need to address this ticket CCIP-4401 to enable it.") t.Parallel() t.Run("Above finality reorg in destination chain", func(t *testing.T) { performAboveFinalityReorgAndValidate(t, "Destination") @@ -900,6 +901,7 @@ func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) { // shouldn't even get initiated and verifies f+1 nodes is able to detect reorg. // Note: LogPollInterval interval is set as 1s to detect the reorg immediately func TestSmokeCCIPReorgAboveFinalityAtSource(t *testing.T) { + t.Skip("Skipping as it is flaying. Need to address this ticket CCIP-4401 to enable it.") t.Parallel() t.Run("Above finality reorg in source chain", func(t *testing.T) { performAboveFinalityReorgAndValidate(t, "Source") From 22033da3f39eb24eaf6f9e1cde5cecd1a5bf3a6f Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Wed, 27 Nov 2024 11:44:46 -0500 Subject: [PATCH 2/4] Typo --- integration-tests/ccip-tests/smoke/ccip_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/ccip-tests/smoke/ccip_test.go b/integration-tests/ccip-tests/smoke/ccip_test.go index 4ad2ede58c7..24437909c8b 100644 --- a/integration-tests/ccip-tests/smoke/ccip_test.go +++ b/integration-tests/ccip-tests/smoke/ccip_test.go @@ -889,7 +889,7 @@ func TestSmokeCCIPReorgBelowFinality(t *testing.T) { // doesn't go through and verifies f+1 nodes is able to detect reorg. // Note: LogPollInterval interval is set as 1s to detect the reorg immediately func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) { - t.Skip("Skipping as it is flaying. Need to address this ticket CCIP-4401 to enable it.") + t.Skip("Skipping as it is flaking. Need to address this ticket CCIP-4401 to enable it.") t.Parallel() t.Run("Above finality reorg in destination chain", func(t *testing.T) { performAboveFinalityReorgAndValidate(t, "Destination") @@ -901,7 +901,7 @@ func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) { // shouldn't even get initiated and verifies f+1 nodes is able to detect reorg. // Note: LogPollInterval interval is set as 1s to detect the reorg immediately func TestSmokeCCIPReorgAboveFinalityAtSource(t *testing.T) { - t.Skip("Skipping as it is flaying. Need to address this ticket CCIP-4401 to enable it.") + t.Skip("Skipping as it is flaking. Need to address this ticket CCIP-4401 to enable it.") t.Parallel() t.Run("Above finality reorg in source chain", func(t *testing.T) { performAboveFinalityReorgAndValidate(t, "Source") From a1df7ec818e3262ea22681093685665e2e530800 Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Wed, 27 Nov 2024 12:05:07 -0500 Subject: [PATCH 3/4] Using SkipFlakey for easy discovery --- integration-tests/ccip-tests/smoke/ccip_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-tests/ccip-tests/smoke/ccip_test.go b/integration-tests/ccip-tests/smoke/ccip_test.go index 24437909c8b..820fc5cc8f1 100644 --- a/integration-tests/ccip-tests/smoke/ccip_test.go +++ b/integration-tests/ccip-tests/smoke/ccip_test.go @@ -15,10 +15,10 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/lib/logging" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_onramp" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/lock_release_token_pool" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_pool" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts" @@ -889,7 +889,7 @@ func TestSmokeCCIPReorgBelowFinality(t *testing.T) { // doesn't go through and verifies f+1 nodes is able to detect reorg. // Note: LogPollInterval interval is set as 1s to detect the reorg immediately func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) { - t.Skip("Skipping as it is flaking. Need to address this ticket CCIP-4401 to enable it.") + testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-4401") t.Parallel() t.Run("Above finality reorg in destination chain", func(t *testing.T) { performAboveFinalityReorgAndValidate(t, "Destination") @@ -901,7 +901,7 @@ func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) { // shouldn't even get initiated and verifies f+1 nodes is able to detect reorg. // Note: LogPollInterval interval is set as 1s to detect the reorg immediately func TestSmokeCCIPReorgAboveFinalityAtSource(t *testing.T) { - t.Skip("Skipping as it is flaking. Need to address this ticket CCIP-4401 to enable it.") + testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-4401") t.Parallel() t.Run("Above finality reorg in source chain", func(t *testing.T) { performAboveFinalityReorgAndValidate(t, "Source") From d7f9724b2bce0149bff599140fd9a4ad00f6af13 Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Wed, 27 Nov 2024 12:43:35 -0500 Subject: [PATCH 4/4] Moving it to local utils --- integration-tests/ccip-tests/smoke/ccip_test.go | 6 +++--- integration-tests/ccip-tests/utils/common.go | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/integration-tests/ccip-tests/smoke/ccip_test.go b/integration-tests/ccip-tests/smoke/ccip_test.go index 820fc5cc8f1..a74d404db18 100644 --- a/integration-tests/ccip-tests/smoke/ccip_test.go +++ b/integration-tests/ccip-tests/smoke/ccip_test.go @@ -15,10 +15,10 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/lib/logging" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" + "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/utils" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_onramp" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/lock_release_token_pool" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_pool" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts" @@ -889,7 +889,7 @@ func TestSmokeCCIPReorgBelowFinality(t *testing.T) { // doesn't go through and verifies f+1 nodes is able to detect reorg. // Note: LogPollInterval interval is set as 1s to detect the reorg immediately func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) { - testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-4401") + utils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-4401") t.Parallel() t.Run("Above finality reorg in destination chain", func(t *testing.T) { performAboveFinalityReorgAndValidate(t, "Destination") @@ -901,7 +901,7 @@ func TestSmokeCCIPReorgAboveFinalityAtDestination(t *testing.T) { // shouldn't even get initiated and verifies f+1 nodes is able to detect reorg. // Note: LogPollInterval interval is set as 1s to detect the reorg immediately func TestSmokeCCIPReorgAboveFinalityAtSource(t *testing.T) { - testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-4401") + utils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-4401") t.Parallel() t.Run("Above finality reorg in source chain", func(t *testing.T) { performAboveFinalityReorgAndValidate(t, "Source") diff --git a/integration-tests/ccip-tests/utils/common.go b/integration-tests/ccip-tests/utils/common.go index afa8158e450..f4d5ee503b1 100644 --- a/integration-tests/ccip-tests/utils/common.go +++ b/integration-tests/ccip-tests/utils/common.go @@ -4,6 +4,7 @@ import ( "path/filepath" "runtime" "sync" + "testing" ) func ProjectRoot() string { @@ -11,6 +12,10 @@ func ProjectRoot() string { return filepath.Join(filepath.Dir(b), "/..") } +func SkipFlakey(t *testing.T, ticketURL string) { + t.Skip("Flakey", ticketURL) +} + // DeleteNilEntriesFromMap checks for nil entry in map, store all not-nil entries to another map and deallocates previous map // Deleting keys from a map actually does not delete the key, It just sets the corresponding value to nil. func DeleteNilEntriesFromMap(inputMap *sync.Map) *sync.Map {