tadeja commented on code in PR #49462:
URL: https://github.com/apache/arrow/pull/49462#discussion_r3196700806


##########
cpp/src/arrow/json/reader_test.cc:
##########
@@ -290,6 +290,27 @@ TEST(ReaderTest, MultipleChunksParallel) {
   AssertTablesEqual(*serial, *threaded);
 }
 
+// Regression test for intermittent threading crashes on MinGW.
+// Run this test multiple times manually to stress-test:
+//   while build/debug/arrow-json-test
+//       --gtest_filter=ReaderTest.MultipleChunksParallelRegression; do :; done
+// See https://github.com/apache/arrow/issues/49272
+TEST(ReaderTest, MultipleChunksParallelRegression) {
+  int64_t count = 1 << 10;
+  ReadOptions read_options;
+  read_options.block_size = static_cast<int>(count / 2);
+  read_options.use_threads = true;
+  ParseOptions parse_options;
+
+  std::string json;
+  for (int64_t i = 0; i < count; ++i) {
+    json += "{\"a\":" + std::to_string(i) + "}\n";
+  }
+
+  ASSERT_OK_AND_ASSIGN(auto table, ReadToTable(std::move(json), read_options, 
parse_options));

Review Comment:
   ```suggestion
     ASSERT_OK_AND_ASSIGN(auto table,
                          ReadToTable(std::move(json), read_options, 
parse_options));
   ```
   [The Lint C++ 
Format](https://github.com/apache/arrow/actions/runs/25446022661/job/74650231104?pr=49462#step:5:96)



-- 
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]

Reply via email to