Browse Source

e2e: constrain test parallelism and reporting (#7516)

pull/7523/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
386c3a0ff7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions
  1. +1
    -1
      test/e2e/runner/test.go
  2. +2
    -2
      test/e2e/tests/app_test.go
  3. +5
    -2
      test/e2e/tests/e2e_test.go

+ 1
- 1
test/e2e/runner/test.go View File

@ -15,5 +15,5 @@ func Test(testnet *e2e.Testnet) error {
return err
}
return execVerbose("./build/tests", "-test.count", "1")
return execVerbose("./build/tests", "-test.count=1", "-test.v")
}

+ 2
- 2
test/e2e/tests/app_test.go View File

@ -144,10 +144,10 @@ func TestApp_Tx(t *testing.T) {
continue
}
t.Run(test.Name, func(t *testing.T) {
// testNode calls t.Parallel as well, so we should
// have a copy of the
test := testCases[idx]
t.Parallel()
testNode(t, func(ctx context.Context, t *testing.T, node e2e.Node) {
t.Parallel()
client, err := node.Client()
require.NoError(t, err)


+ 5
- 2
test/e2e/tests/e2e_test.go View File

@ -3,6 +3,7 @@ package e2e_test
import (
"context"
"os"
"sort"
"sync"
"testing"
@ -46,6 +47,10 @@ func testNode(t *testing.T, testFunc func(context.Context, *testing.T, e2e.Node)
node := testnet.LookupNode(name)
require.NotNil(t, node, "node %q not found in testnet %q", name, testnet.Name)
nodes = []*e2e.Node{node}
} else {
sort.Slice(nodes, func(i, j int) bool {
return nodes[i].Name < nodes[j].Name
})
}
for _, node := range nodes {
@ -56,8 +61,6 @@ func testNode(t *testing.T, testFunc func(context.Context, *testing.T, e2e.Node)
}
t.Run(node.Name, func(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()


Loading…
Cancel
Save