mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 22:23:11 +00:00
Skip long internal/p2p/conn 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 internal/p2p/conn from about 21.7s to about 1.9s.
This commit is contained in:
@@ -315,6 +315,10 @@ func TestMConnectionMultiplePings(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMConnectionPingPongs(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
// check that we are not leaking any go-routines
|
||||
t.Cleanup(leaktest.CheckTimeout(t, 10*time.Second))
|
||||
|
||||
@@ -558,6 +562,10 @@ func TestMConnectionReadErrorUnknownMsgType(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMConnectionTrySend(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
server, client := net.Pipe()
|
||||
t.Cleanup(closeAll(t, client, server))
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
@@ -606,6 +614,10 @@ func TestConnVectors(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMConnectionChannelOverflow(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
chOnErr := make(chan struct{})
|
||||
chOnRcv := make(chan struct{})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user