mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-28 03:46:33 +00:00
Skip long node tests in -short mode
I added checks against testing.Short for tests that took longer than about one second on my machine. Running with -short reduces the test time of node from about 7.7s to about 0.9s. The difference is much more pronounced with the race detector enabled, about 33s without -short and about 1.4s with -short.
This commit is contained in:
@@ -106,6 +106,10 @@ func getTestNode(ctx context.Context, t *testing.T, conf *config.Config, logger
|
||||
}
|
||||
|
||||
func TestNodeDelayedStart(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
cfg, err := config.ResetTestRoot(t.TempDir(), "node_delayed_start_test")
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -195,6 +199,10 @@ func TestNodeSetPrivValTCP(t *testing.T) {
|
||||
|
||||
// address without a protocol must result in error
|
||||
func TestPrivValidatorListenAddrNoProtocol(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
@@ -441,6 +449,10 @@ func TestMaxTxsProposalBlockSize(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMaxProposalBlockSize(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user