mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-11 07:20:19 +00:00
Skip long rpc/jsonrpc/client 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 rpc/jsonrpc/client from about 9.2s to about 0.5s.
This commit is contained in:
@@ -65,6 +65,10 @@ func (h *myTestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func TestWSClientReconnectsAfterReadFailure(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
t.Cleanup(leaktest.Check(t))
|
||||
|
||||
// start server
|
||||
@@ -97,6 +101,10 @@ func TestWSClientReconnectsAfterReadFailure(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWSClientReconnectsAfterWriteFailure(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
t.Cleanup(leaktest.Check(t))
|
||||
|
||||
// start server
|
||||
@@ -127,6 +135,10 @@ func TestWSClientReconnectsAfterWriteFailure(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWSClientReconnectFailure(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
t.Cleanup(leaktest.Check(t))
|
||||
|
||||
// start server
|
||||
|
||||
Reference in New Issue
Block a user