Skip to content

Commit

Permalink
Optimizes OCR2 Test Runtimes (#11875)
Browse files Browse the repository at this point in the history
* Parallel

* Re-enable tests
  • Loading branch information
kalverra authored Jan 24, 2024
1 parent c308d46 commit 1d7e01b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
10 changes: 6 additions & 4 deletions integration-tests/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand All @@ -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)
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 1d7e01b

Please sign in to comment.