mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 22:23:11 +00:00
Skip long light 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 light from about 21s to about 0.9s.
This commit is contained in:
@@ -235,6 +235,10 @@ func TestLightClientAttackEvidence_Equivocation(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLightClientAttackEvidence_ForwardLunatic(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
// primary performs a lunatic attack but changes the time of the header to
|
||||
// something in the future relative to the blockchain
|
||||
var (
|
||||
|
||||
@@ -17,6 +17,10 @@ import (
|
||||
|
||||
// Manually getting light blocks and verifying them.
|
||||
func TestExampleClient(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
conf, err := rpctest.CreateConfig(t, "ExampleClient_VerifyLightBlockAtHeight")
|
||||
|
||||
@@ -23,6 +23,10 @@ import (
|
||||
|
||||
// Automatically getting new headers and verifying them.
|
||||
func TestClientIntegration_Update(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
t.Parallel()
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
@@ -84,6 +88,10 @@ func TestClientIntegration_Update(t *testing.T) {
|
||||
|
||||
// Manually getting light blocks and verifying them.
|
||||
func TestClientIntegration_VerifyLightBlockAtHeight(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
t.Parallel()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
@@ -162,6 +170,10 @@ func waitForBlock(ctx context.Context, p provider.Provider, height int64) (*type
|
||||
}
|
||||
|
||||
func TestClientStatusRPC(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
conf, err := rpctest.CreateConfig(t, t.Name())
|
||||
|
||||
Reference in New Issue
Block a user