1
0
Fork 0
mirror of https://github.com/vbatts/merkle.git synced 2024-12-02 19:15:39 +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 os.Remove(fh.Name())
// slow, i know ... FIXME
for i := 0; i < 5; i++ {
b := []byte{byte(i)}
var b2 []byte
for j := 0; j < bs; j++ {
fh.Write(b)
b2 = append(b2, b...)
}
fh.Write(b2)
}
if err := fh.Sync(); err != nil {
t.Fatal(err)