From b6550805131cf86361250eb986e869348b3a490d Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 30 Oct 2023 07:48:36 -0500 Subject: [PATCH] skipped test cleanup (#11026) --- core/internal/testutils/testutils.go | 4 ++++ .../evm21/logprovider/integration_test.go | 20 +++++++++---------- .../internal/ocr2vrf_integration_test.go | 4 ++-- .../uni_client_integration_test.go | 5 +++-- .../vrf/v2/integration_v2_plus_test.go | 4 +--- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/core/internal/testutils/testutils.go b/core/internal/testutils/testutils.go index 938d814b9eb..79c86f0c5f8 100644 --- a/core/internal/testutils/testutils.go +++ b/core/internal/testutils/testutils.go @@ -451,3 +451,7 @@ func MustDecodeBase64(s string) (b []byte) { } return } + +func SkipFlakey(t *testing.T, ticketURL string) { + t.Skip("Flakey", ticketURL) +} diff --git a/core/services/ocr2/plugins/ocr2keeper/evm21/logprovider/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/evm21/logprovider/integration_test.go index 506dcb9ea33..811468746e3 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evm21/logprovider/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evm21/logprovider/integration_test.go @@ -455,9 +455,7 @@ func TestIntegration_LogEventProvider_RateLimit(t *testing.T) { } func TestIntegration_LogRecoverer_Backfill(t *testing.T) { - t.Skip() // TODO: remove skip after removing constant timeouts - ctx, cancel := context.WithTimeout(testutils.Context(t), time.Second*60) - defer cancel() + ctx := testutils.Context(t) backend, stopMining, accounts := setupBackend(t) defer stopMining() @@ -515,21 +513,21 @@ func TestIntegration_LogRecoverer_Backfill(t *testing.T) { }() defer recoverer.Close() - lctx, lcancel := context.WithTimeout(ctx, time.Second*15) - defer lcancel() var allProposals []ocr2keepers.UpkeepPayload - for lctx.Err() == nil { + for { poll(backend.Commit()) proposals, err := recoverer.GetRecoveryProposals(ctx) require.NoError(t, err) allProposals = append(allProposals, proposals...) - if len(allProposals) < n { - time.Sleep(100 * time.Millisecond) - continue + if len(allProposals) >= n { + break // success + } + select { + case <-ctx.Done(): + t.Fatalf("could not recover logs before timeout: %s", ctx.Err()) + case <-time.After(100 * time.Millisecond): } - break } - require.NoError(t, lctx.Err(), "could not recover logs before timeout") } func collectPayloads(ctx context.Context, t *testing.T, logProvider logprovider.LogEventProvider, n, rounds int) []ocr2keepers.UpkeepPayload { diff --git a/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go b/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go index b9a4d500026..cf7a408725d 100644 --- a/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go +++ b/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go @@ -326,12 +326,12 @@ func setupNodeOCR2( } func TestIntegration_OCR2VRF_ForwarderFlow(t *testing.T) { - t.Skip() + testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/VRF-688") runOCR2VRFTest(t, true) } func TestIntegration_OCR2VRF(t *testing.T) { - t.Skip() + testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/VRF-688") runOCR2VRFTest(t, false) } diff --git a/core/services/synchronization/uni_client_integration_test.go b/core/services/synchronization/uni_client_integration_test.go index 1ad2865669e..fcc0dc23717 100644 --- a/core/services/synchronization/uni_client_integration_test.go +++ b/core/services/synchronization/uni_client_integration_test.go @@ -6,16 +6,17 @@ import ( "testing" "time" - "github.com/smartcontractkit/wsrpc" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/wsrpc" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization/telem" ) func TestUniClient(t *testing.T) { - t.Skip() + t.Skip("Incomplete", "https://smartcontract-it.atlassian.net/browse/BCF-2729") privKey, err := hex.DecodeString("TODO") require.NoError(t, err) pubKey, err := hex.DecodeString("TODO") diff --git a/core/services/vrf/v2/integration_v2_plus_test.go b/core/services/vrf/v2/integration_v2_plus_test.go index 9adf47f256b..f08c10c2004 100644 --- a/core/services/vrf/v2/integration_v2_plus_test.go +++ b/core/services/vrf/v2/integration_v2_plus_test.go @@ -486,9 +486,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_EOA_Request_Batching_Enabled(t *tes } func TestVRFV2PlusIntegration_SingleConsumer_EIP150_HappyPath(t *testing.T) { - // See: https://smartcontract-it.atlassian.net/browse/VRF-589 - // Temporarily skipping to figure out issue with test - t.Skip() + testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/VRF-589") t.Parallel() ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 1, false)