Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-15137: [C++][CI] Fix ASAN error in streaming JSON reader tests #33772

Merged
merged 1 commit into from Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions cpp/src/arrow/json/reader_test.cc
Expand Up @@ -439,14 +439,14 @@ class StreamingReaderTestBase {
virtual ~StreamingReaderTestBase() = default;

protected:
static std::shared_ptr<io::InputStream> MakeTestStream(const std::string& str) {
auto buffer = std::make_shared<Buffer>(str);
static std::shared_ptr<io::InputStream> MakeTestStream(std::string str) {
auto buffer = Buffer::FromString(std::move(str));
return std::make_shared<io::BufferReader>(std::move(buffer));
}
// Stream with simulated latency
static std::shared_ptr<io::InputStream> MakeTestStream(const std::string& str,
static std::shared_ptr<io::InputStream> MakeTestStream(std::string str,
double latency) {
return std::make_shared<io::SlowInputStream>(MakeTestStream(str), latency);
return std::make_shared<io::SlowInputStream>(MakeTestStream(std::move(str)), latency);
}

Result<std::shared_ptr<StreamingReader>> MakeReader(
Expand Down