Commit 87079cc1 authored by Rob Pike's avatar Rob Pike

bytes: delete the test for huge buffers

It takes too much memory to be reliable and causes
trouble on 32-bit machines.
Sigh.

Fixes #2756.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5567043
parent e17afa4d
......@@ -386,24 +386,3 @@ func TestReadEmptyAtEOF(t *testing.T) {
t.Errorf("wrong count; got %d want 0", n)
}
}
func TestHuge(t *testing.T) {
// About to use tons of memory, so avoid for simple installation testing.
if testing.Short() {
return
}
// We expect a panic.
defer func() {
if err, ok := recover().(error); ok && err == ErrTooLarge {
return
} else {
t.Error(`expected "too large" error; got`, err)
}
}()
b := new(Buffer)
big := make([]byte, 500e6)
for i := 0; i < 1000; i++ {
b.Write(big)
}
t.Error("panic expected")
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment