Close BufferOutputStream after completing file or stream writes

Change-Id: I0116b58544db8576b1875463dbbc70849a456e9c
This commit is contained in:
Wes McKinney committed 2017-01-23 06:42:24 -05:00
1 parent 31e519f744
commit e9d918ed9b
1 file changed
+2
+2
View File
@@ -75,6 +75,7 @@ class TestFileFormat : public ::testing::TestWithParam<MakeRecordBatch*> {
RETURN_NOT_OK(writer->WriteRecordBatch(*batch));
}
RETURN_NOT_OK(writer->Close());
RETURN_NOT_OK(sink_->Close());
// Current offset into stream is the end of the file
int64_t footer_offset;
@@ -138,6 +139,7 @@ class TestStreamFormat : public ::testing::TestWithParam<MakeRecordBatch*> {
RETURN_NOT_OK(writer->WriteRecordBatch(batch));
}
RETURN_NOT_OK(writer->Close());
RETURN_NOT_OK(sink_->Close());
// Open the file
auto buf_reader = std::make_shared<io::BufferReader>(buffer_);