Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1735,6 +1735,7 @@ private int readNextLength32()
public void close()
throws IOException
{
totalReadBytes += position;
buffer = EMPTY_BUFFER;
position = 0;
in.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ class MessageUnpackerTest extends AirSpec with Benchmark {
}
count shouldBe 6
unpacker.getTotalReadBytes shouldBe arr.length

unpacker.close()
unpacker.getTotalReadBytes shouldBe arr.length
}
}

Expand All @@ -268,6 +271,9 @@ class MessageUnpackerTest extends AirSpec with Benchmark {

skipCount shouldBe 2
unpacker.getTotalReadBytes shouldBe testData.length

unpacker.close()
unpacker.getTotalReadBytes shouldBe testData.length
}
}

Expand Down Expand Up @@ -322,6 +328,9 @@ class MessageUnpackerTest extends AirSpec with Benchmark {

ib.result() shouldBe intSeq.toSeq
unpacker.getTotalReadBytes shouldBe testData2.length

unpacker.close()
unpacker.getTotalReadBytes shouldBe testData2.length
}
}

Expand Down Expand Up @@ -352,6 +361,9 @@ class MessageUnpackerTest extends AirSpec with Benchmark {
}
count shouldBe numElems
unpacker.getTotalReadBytes shouldBe data.length

unpacker.close()
unpacker.getTotalReadBytes shouldBe data.length
}
}
}
Expand Down Expand Up @@ -869,6 +881,9 @@ class MessageUnpackerTest extends AirSpec with Benchmark {
unpacker.unpackInt shouldBe 1

unpacker.getTotalReadBytes shouldBe arr.length

unpacker.close()
unpacker.getTotalReadBytes shouldBe arr.length
}
}
}
Expand Down