diff --git a/jwk/cast_test.go b/jwk/cast_test.go index 8ab4051a62..f5798fed98 100644 --- a/jwk/cast_test.go +++ b/jwk/cast_test.go @@ -7,6 +7,10 @@ import ( ) func TestMustRSAPrivate(t *testing.T) { + if testing.Short() { + t.SkipNow() + } + keys, err := new(RS256Generator).Generate("") assert.Nil(t, err) diff --git a/jwk/generator_test.go b/jwk/generator_test.go index 0ceed1b647..a155bac272 100644 --- a/jwk/generator_test.go +++ b/jwk/generator_test.go @@ -11,6 +11,10 @@ import ( ) func TestGenerator(t *testing.T) { + if testing.Short() { + t.SkipNow() + } + for k, c := range []struct { g KeyGenerator check func(*jose.JsonWebKeySet) diff --git a/rand/numeric/int_test.go b/rand/numeric/int_test.go index b2667acee1..be889ab011 100644 --- a/rand/numeric/int_test.go +++ b/rand/numeric/int_test.go @@ -27,6 +27,10 @@ func TestUInt32(t *testing.T) { } func TestInt64IsUnique(t *testing.T) { + if testing.Short() { + t.SkipNow() + } + // Probability of collision is around 1 in a million times := 6000000 s := make(map[int64]bool) @@ -43,6 +47,10 @@ func TestInt64IsUnique(t *testing.T) { } func TestUInt64IsUnique(t *testing.T) { + if testing.Short() { + t.SkipNow() + } + // Probability of collision is around 1 in a million times := 6000000 s := make(map[uint64]bool) @@ -59,6 +67,10 @@ func TestUInt64IsUnique(t *testing.T) { } func TestInt32IsUnique(t *testing.T) { + if testing.Short() { + t.SkipNow() + } + // Probability of collision is around 1 in 1000 times := 3000 s := make(map[int32]bool) @@ -75,6 +87,10 @@ func TestInt32IsUnique(t *testing.T) { } func TestUInt32IsUnique(t *testing.T) { + if testing.Short() { + t.SkipNow() + } + // Probability of collision is around 1 in 1000 times := 3000 s := make(map[uint32]bool) diff --git a/rand/sequence/sequence_test.go b/rand/sequence/sequence_test.go index d85d1e3fda..dbeb0099d5 100644 --- a/rand/sequence/sequence_test.go +++ b/rand/sequence/sequence_test.go @@ -51,6 +51,10 @@ func TestRuneSequenceMatchesPattern(t *testing.T) { } func TestRuneSequenceIsPseudoUnique(t *testing.T) { + if testing.Short() { + t.SkipNow() + } + // 1 in 100 probability of collision times := 9000 runes := []rune("ab")