Skip to content

Commit

Permalink
parallelize e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed May 22, 2024
1 parent 431889b commit d398b1b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions integration-tests/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package smoke
import (
"fmt"
"maps"
"os/exec"
"testing"
"time"

Expand Down Expand Up @@ -37,7 +38,10 @@ func TestSolanaOCRV2Smoke(t *testing.T) {

test := test
t.Run(test.name, func(t *testing.T) {
state, err := common.NewOCRv2State(t, 1, "gauntlet-"+test.name, &config)
t.Parallel()
name := "gauntlet-" + test.name

state, err := common.NewOCRv2State(t, 1, name, &config)
require.NoError(t, err, "Could not setup the ocrv2 state")
if len(test.env) > 0 {
state.Common.TestEnvDetails.NodeOpts = append(state.Common.TestEnvDetails.NodeOpts, func(n *test_env.ClNode) {
Expand All @@ -50,7 +54,13 @@ func TestSolanaOCRV2Smoke(t *testing.T) {

state.DeployCluster(utils.ContractsDir)

sg, err := gauntlet.NewSolanaGauntlet(fmt.Sprintf("%s/gauntlet", utils.ProjectRoot))
// copy gauntlet folder to run in parallel (gauntlet generates an output file that is read by the e2e tests - causes conflict if shared)
gauntletCopyPath := utils.ProjectRoot + "/" + name
if out, cpErr := exec.Command("cp", "-r", utils.ProjectRoot+"/gauntlet", gauntletCopyPath).Output(); cpErr != nil { // nolint:gosec
require.NoError(t, err, "output: "+string(out))
}

sg, err := gauntlet.NewSolanaGauntlet(gauntletCopyPath)
require.NoError(t, err)
state.Gauntlet = sg

Expand Down

0 comments on commit d398b1b

Please sign in to comment.