e2e: constrain test parallelism and reporting (backport #7516) (#7517)

* e2e: constrain test parallelism and reporting (#7516)

(cherry picked from commit 386c3a0ff7)

# Conflicts:
#	test/e2e/tests/app_test.go
#	test/e2e/tests/e2e_test.go

* cleanup tests

Co-authored-by: Sam Kleinman <garen@tychoish.com>
This commit is contained in:
mergify[bot]
2022-01-06 08:22:57 -05:00
committed by GitHub
parent fe31621dc2
commit 09aa1009bd
3 changed files with 8 additions and 4 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(t *testing.T, node e2e.Node) {
t.Parallel()
client, err := node.Client()
require.NoError(t, err)
+5 -1
View File
@@ -3,6 +3,7 @@ package e2e_test
import (
"context"
"os"
"sort"
"sync"
"testing"
@@ -47,6 +48,10 @@ func testNode(t *testing.T, testFunc func(*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 {
@@ -57,7 +62,6 @@ func testNode(t *testing.T, testFunc func(*testing.T, e2e.Node)) {
}
t.Run(node.Name, func(t *testing.T) {
t.Parallel()
testFunc(t, node)
})
}