1
0
Fork 0
mirror of https://github.com/vbatts/merkle.git synced 2024-12-03 11:35:40 +00:00

stream_test: shave 2sec off tests

This commit is contained in:
Vincent Batts 2015-08-16 18:42:40 -04:00
parent 08e311195d
commit c5700a9f0d

View file

@ -19,12 +19,13 @@ func TestMerkleHashWriterLargeChunk(t *testing.T) {
defer fh.Close() defer fh.Close()
defer os.Remove(fh.Name()) defer os.Remove(fh.Name())
// slow, i know ... FIXME
for i := 0; i < 5; i++ { for i := 0; i < 5; i++ {
b := []byte{byte(i)} b := []byte{byte(i)}
var b2 []byte
for j := 0; j < bs; j++ { for j := 0; j < bs; j++ {
fh.Write(b) b2 = append(b2, b...)
} }
fh.Write(b2)
} }
if err := fh.Sync(); err != nil { if err := fh.Sync(); err != nil {
t.Fatal(err) t.Fatal(err)