mirror of
https://github.com/tendermint/tendermint.git
synced 2026-07-19 22:42:24 +00:00
* 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:
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user