Skip to content

Commit

Permalink
fix memory leak of test_chunked_read (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
bicycle1885 committed Aug 9, 2018
1 parent 0010e44 commit 4f1e199
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/testtools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,13 @@ function test_chunked_read(Encoder, Decoder)
data = mapfoldl(x->transcode(encoder, x), vcat, chunks, init=UInt8[])
buffer = NoopStream(IOBuffer(data))
ok = true
local stream
for chunk in chunks
stream = TranscodingStream(Decoder(), buffer, stop_on_end=true)
ok &= hash(read(stream)) == hash(chunk)
ok &= eof(stream)
close(stream)
end
Test.@test ok
close(stream)
end
finalize(encoder)
end
Expand Down

0 comments on commit 4f1e199

Please sign in to comment.