From 1d7e01b6b758cf97e9d46d1f1818728e4c90cecd Mon Sep 17 00:00:00 2001 From: Adam Hamrick Date: Wed, 24 Jan 2024 13:15:39 -0500 Subject: [PATCH] Optimizes OCR2 Test Runtimes (#11875) * Parallel * Re-enable tests --- .github/workflows/integration-tests.yml | 10 ++++++---- integration-tests/smoke/ocr2_test.go | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 3ea98ddd8ce..376d49a8e18 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -418,6 +418,10 @@ jobs: fail-fast: false matrix: product: + - name: runlog + nodes: 2 + os: ubuntu-latest + pyroscope_env: "ci-smoke-runlog-evm-simulated" - name: cron nodes: 2 os: ubuntu-latest @@ -429,13 +433,11 @@ jobs: - name: ocr nodes: 2 os: ubuntu-latest - run: -run TestOCRJobReplacement file: ocr pyroscope_env: ci-smoke-ocr-evm-simulated - name: ocr2 nodes: 6 os: ubuntu-latest - run: -run TestOCRv2JobReplacement file: ocr2 pyroscope_env: ci-smoke-ocr2-evm-simulated - name: ocr2 @@ -456,11 +458,11 @@ jobs: os: ubuntu-latest pyroscope_env: ci-smoke-vrf2plus-evm-simulated - name: forwarder_ocr - nodes: 1 + nodes: 2 os: ubuntu-latest pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated - name: forwarders_ocr2 - nodes: 1 + nodes: 2 os: ubuntu-latest pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated runs-on: ${{ matrix.product.os }} diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index 0898dd69985..89dcfc187df 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -102,7 +102,7 @@ func TestOCRv2Basic(t *testing.T) { require.NoError(t, err, "Error configuring OCRv2 aggregator contracts") err = actions.WatchNewOCR2Round(1, aggregatorContracts, env.EVMClient, time.Minute*5, l) - require.NoError(t, err, "Error starting new OCR2 round") + require.NoError(t, err, "Error watching for new OCR2 round") roundData, err := aggregatorContracts[0].GetRound(testcontext.Get(t), big.NewInt(1)) require.NoError(t, err, "Getting latest answer from OCR contract shouldn't fail") require.Equal(t, int64(5), roundData.Answer.Int64(), @@ -189,7 +189,7 @@ func TestOCRv2Request(t *testing.T) { require.NoError(t, err, "Error configuring OCRv2 aggregator contracts") err = actions.WatchNewOCR2Round(1, aggregatorContracts, env.EVMClient, time.Minute*5, l) - require.NoError(t, err, "Error starting new OCR2 round") + require.NoError(t, err, "Error watching for new OCR2 round") roundData, err := aggregatorContracts[0].GetRound(testcontext.Get(t), big.NewInt(1)) require.NoError(t, err, "Getting latest answer from OCR contract shouldn't fail") require.Equal(t, int64(5), roundData.Answer.Int64(), @@ -211,7 +211,9 @@ func TestOCRv2Request(t *testing.T) { } } +// TestOCRv2JobReplacement tests that a func TestOCRv2JobReplacement(t *testing.T) { + t.Parallel() l := logging.GetTestLogger(t) config, err := tc.GetConfig("Smoke", tc.OCR2) @@ -270,7 +272,7 @@ func TestOCRv2JobReplacement(t *testing.T) { require.NoError(t, err, "Error configuring OCRv2 aggregator contracts") err = actions.WatchNewOCR2Round(1, aggregatorContracts, env.EVMClient, time.Minute*5, l) - require.NoError(t, err, "Error starting new OCR2 round") + require.NoError(t, err, "Error watching for new OCR2 round") roundData, err := aggregatorContracts[0].GetRound(testcontext.Get(t), big.NewInt(1)) require.NoError(t, err, "Getting latest answer from OCR contract shouldn't fail") require.Equal(t, int64(5), roundData.Answer.Int64(), @@ -300,7 +302,7 @@ func TestOCRv2JobReplacement(t *testing.T) { require.NoError(t, err, "Error creating OCRv2 jobs") err = actions.WatchNewOCR2Round(3, aggregatorContracts, env.EVMClient, time.Minute*3, l) - require.NoError(t, err, "Error starting new OCR2 round") + require.NoError(t, err, "Error watching for new OCR2 round") roundData, err = aggregatorContracts[0].GetRound(testcontext.Get(t), big.NewInt(3)) require.NoError(t, err, "Getting latest answer from OCR contract shouldn't fail") require.Equal(t, int64(15), roundData.Answer.Int64(),