This is an automated email from the ASF dual-hosted git repository.
pitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 068e3c9ed9e GH-55630: [CI][C++] Relax simdjson error message checking
(#55651)
068e3c9ed9e is described below
commit 068e3c9ed9efc2fd3a48037c026ff3eff1cc45a6
Author: Antoine Pitrou <[email protected]>
AuthorDate: Tue Nov 17 21:09:16 2026 +0100
GH-55630: [CI][C++] Relax simdjson error message checking (#55651)
### Rationale for this change
The kind of error messages returned has changed slightly in some of our
tests with simdjson 5.2.0, so relax these tests.
### Are these changes tested?
Yes, by definition.
### Are there any user-facing changes?
No.
### Was AI used for this PR?
In accordance to the [AI generation
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [x] Human
- [ ] AI
**Reviewed before submission by:**
- [x] Human
- [ ] AI
- [ ] Not reviewed
* GitHub Issue: #55630
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
---
cpp/src/arrow/json/reader_test.cc | 10 +++++++---
python/pyarrow/tests/test_json.py | 4 ++--
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/cpp/src/arrow/json/reader_test.cc
b/cpp/src/arrow/json/reader_test.cc
index bc533595614..9d056388a01 100644
--- a/cpp/src/arrow/json/reader_test.cc
+++ b/cpp/src/arrow/json/reader_test.cc
@@ -741,9 +741,13 @@ TEST_P(StreamingReaderTest,
PropagateErrorsNonLinewiseChunker) {
read_options_.block_size = 10;
parse_options_.newlines_in_values = true;
- EXPECT_RAISES_WITH_MESSAGE_THAT(Invalid,
- ::testing::StartsWith("Invalid: JSON parse
error"),
- MakeReader(bad_first_block));
+ // (can't use ::testing::MatchesRegex because of
+ // https://github.com/google/googletest/issues/3084)
+ EXPECT_RAISES_WITH_MESSAGE_THAT(
+ Invalid,
+ ::testing::AnyOf(::testing::StartsWith("Invalid: JSON parse error"),
+ ::testing::StartsWith("Invalid: Failed to get JSON
object")),
+ MakeReader(bad_first_block));
ASSERT_OK_AND_ASSIGN(reader, MakeReader(bad_middle_blocks));
AssertReadNext(reader, &batch);
diff --git a/python/pyarrow/tests/test_json.py
b/python/pyarrow/tests/test_json.py
index 2239c2f1bb8..3dc54d53fba 100644
--- a/python/pyarrow/tests/test_json.py
+++ b/python/pyarrow/tests/test_json.py
@@ -525,7 +525,7 @@ class BaseTestStreamingJSONRead(BaseTestJSON):
'n': [0]
}
with pytest.raises(pa.ArrowInvalid,
- match="JSON parse error *"):
+ match="(JSON parse error|Failed to get JSON
object)"):
reader.read_next_batch()
with pytest.raises(StopIteration):
@@ -546,7 +546,7 @@ class BaseTestStreamingJSONRead(BaseTestJSON):
'n': [0]
}
with pytest.raises(pa.ArrowInvalid,
- match="JSON parse error *"):
+ match="(JSON parse error|Failed to get JSON
object)"):
reader.read_next_batch()
with pytest.raises(StopIteration):