e2e: constrain test parallelism and reporting (#7516)

This commit is contained in:
Sam Kleinman
2022-01-05 17:45:16 -05:00
committed by GitHub
parent 752a3a6c24
commit 386c3a0ff7
3 changed files with 8 additions and 5 deletions
+1 -1
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
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
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()