summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/rand/rand_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/crypto/rand/rand_test.go')
-rw-r--r--src/pkg/crypto/rand/rand_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pkg/crypto/rand/rand_test.go b/src/pkg/crypto/rand/rand_test.go
index f64ead4ca..bfae7ce4f 100644
--- a/src/pkg/crypto/rand/rand_test.go
+++ b/src/pkg/crypto/rand/rand_test.go
@@ -11,7 +11,11 @@ import (
)
func TestRead(t *testing.T) {
- b := make([]byte, 4e6)
+ var n int = 4e6
+ if testing.Short() {
+ n = 1e5
+ }
+ b := make([]byte, n)
n, err := Read(b)
if n != len(b) || err != nil {
t.Fatalf("Read(buf) = %d, %s", n, err)