From 57167f4562cdeb5210a0c59b2239a4cea64b33dc Mon Sep 17 00:00:00 2001 From: Adam Hamrick Date: Thu, 17 Oct 2024 13:57:42 -0400 Subject: [PATCH] Fixes CCIP Chaos Tests to Run --- .github/workflows/ccip-chaos-tests.yml | 2 +- integration-tests/ccip-tests/actions/ccip_helpers.go | 2 +- integration-tests/ccip-tests/testsetups/ccip.go | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ccip-chaos-tests.yml b/.github/workflows/ccip-chaos-tests.yml index da868886f1..2127e8f56e 100644 --- a/.github/workflows/ccip-chaos-tests.yml +++ b/.github/workflows/ccip-chaos-tests.yml @@ -135,7 +135,7 @@ jobs: BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} with: - test_command_to_run: cd ./integration-tests && go test -timeout 1h -count=1 -json -test.parallel 11 -run 'TestChaosCCIP' ./chaos 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci + test_command_to_run: cd ./integration-tests/ccip-tests && go test -timeout 1h -count=1 -json -test.parallel 11 -run 'TestChaosCCIP' ./chaos 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci test_download_vendor_packages_command: make gomod artifacts_location: ./integration-tests/chaos/logs publish_check_name: CCIP Chaos Test Results diff --git a/integration-tests/ccip-tests/actions/ccip_helpers.go b/integration-tests/ccip-tests/actions/ccip_helpers.go index eb34db40de..658cff9f60 100644 --- a/integration-tests/ccip-tests/actions/ccip_helpers.go +++ b/integration-tests/ccip-tests/actions/ccip_helpers.go @@ -3659,7 +3659,7 @@ func (lane *CCIPLane) DeployNewCCIPLane( execNodes := clNodes[env.ExecNodeStartIndex : env.ExecNodeStartIndex+env.NumOfExecNodes] if !commitAndExecOnSameDON { if len(clNodes) < 11 { - return fmt.Errorf("not enough CL nodes for separate commit and execution nodes") + return fmt.Errorf("not enough CL nodes for separate commit and execution nodes, need at least 11 CL nodes, found %d", len(clNodes)) } bootstrapExec = clNodes[1] // for a set-up of different commit and execution nodes second node is the bootstrapper for execution nodes } diff --git a/integration-tests/ccip-tests/testsetups/ccip.go b/integration-tests/ccip-tests/testsetups/ccip.go index 75a32f8b9e..2fb067dfc2 100644 --- a/integration-tests/ccip-tests/testsetups/ccip.go +++ b/integration-tests/ccip-tests/testsetups/ccip.go @@ -1363,19 +1363,19 @@ func (o *CCIPTestSetUpOutputs) CreateEnvironment( ccipEnv.NumOfCommitNodes = testConfig.TestGroupInput.NoOfCommitNodes ccipEnv.NumOfExecNodes = ccipEnv.NumOfCommitNodes if !pointer.GetBool(testConfig.TestGroupInput.CommitAndExecuteOnSameDON) { - if len(ccipEnv.CLNodesWithKeys) < 11 { - return fmt.Errorf("not enough CL nodes for separate commit and execution nodes") + if len(ccipEnv.CLNodesWithKeys[chains[0].GetChainID().String()]) < 11 { + return fmt.Errorf("not enough CL nodes for separate commit and execution nodes, need at least 11 CL nodes, found %d", len(ccipEnv.CLNodesWithKeys)) } if testConfig.TestGroupInput.NoOfCommitNodes >= totalNodes { return fmt.Errorf("number of commit nodes can not be greater than total number of nodes in DON") } + if ccipEnv.NumOfExecNodes < 4 { + return fmt.Errorf("insufficient number of exec nodes") + } // first two nodes are reserved for bootstrap commit and bootstrap exec ccipEnv.CommitNodeStartIndex = 2 ccipEnv.ExecNodeStartIndex = 2 + testConfig.TestGroupInput.NoOfCommitNodes ccipEnv.NumOfExecNodes = totalNodes - (2 + testConfig.TestGroupInput.NoOfCommitNodes) - if ccipEnv.NumOfExecNodes < 4 { - return fmt.Errorf("insufficient number of exec nodes") - } } ccipEnv.NumOfAllowedFaultyExec = (ccipEnv.NumOfExecNodes - 1) / 3 ccipEnv.NumOfAllowedFaultyCommit = (ccipEnv.NumOfCommitNodes - 1) / 3