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:
parent
08e311195d
commit
c5700a9f0d
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue