bkietz commented on code in PR #37713:
URL: https://github.com/apache/arrow/pull/37713#discussion_r1330237011
##########
cpp/src/arrow/filesystem/s3fs_test.cc:
##########
@@ -590,6 +590,19 @@ class TestS3FS : public S3TestMixin {
AssertObjectContents(client_.get(), "bucket", "somefile", "new data");
}
+ void TestOpenOutputStreamCloseAsyncDestructor() {
+ std::shared_ptr<io::OutputStream> stream;
+ ASSERT_OK_AND_ASSIGN(stream, fs_->OpenOutputStream("bucket/somefile"));
+ ASSERT_OK(stream->Write("new data"));
+ // Destructor implicitly closes stream and completes the multipart upload.
+ // GH-37670: Testing it doesn't matter whether flush is triggered
asynchronously
+ // after CloseAsync or synchronously after stream.reset().
Review Comment:
```suggestion
// after CloseAsync or synchronously after stream.reset() since we're
just
// checking that `closeAsyncFut` keeps the stream alive until completion
// rather than segfaulting on a dangling stream
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]