From 375b21f4fb7f90fe7a602df8e5cf051f09733df3 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Mon, 21 Oct 2024 18:38:32 +0900 Subject: [PATCH] GH-44483: [GLib] Don't check invalid decimal precision message in test (#44484) ### Rationale for this change Two tests failed if `-DARROW_EXTRA_ERROR_CONTEXT=ON` in the C++ build. ### What changes are included in this PR? Don't check invalid decimal precision message in test. Because it depends on `-DARROW_EXTRA_ERROR_CONTEXT={ON,OFF}`. Our tests should be stable whether the option value. Before this change: compare the exception class and message. After this change: compare the exception class only. ### Are these changes tested? YES Before this change ``` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1962 tests, 2148 assertions, 2 failures, 0 errors, 0 pendings, 14 omissions, 0 notifications 99.8973% passed ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 23.71 tests/s, 25.95 assertions/s ``` After this change ``` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1962 tests, 2148 assertions, 0 failures, 0 errors, 0 pendings, 14 omissions, 0 notifications 100% passed ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 23.75 tests/s, 26.00 assertions/s ``` ### Are there any user-facing changes? No. * GitHub Issue: #44483 Co-Authored-by: Sutou Kouhei Authored-by: Hiroyuki Sato Signed-off-by: Sutou Kouhei --- c_glib/test/test-decimal128-data-type.rb | 4 +--- c_glib/test/test-decimal256-data-type.rb | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/c_glib/test/test-decimal128-data-type.rb b/c_glib/test/test-decimal128-data-type.rb index f0e62c9d131b4..8cf97e38d47b5 100644 --- a/c_glib/test/test-decimal128-data-type.rb +++ b/c_glib/test/test-decimal128-data-type.rb @@ -47,9 +47,7 @@ def test_decimal_data_type_new end def test_invalid_precision - message = - "[decimal128-data-type][new]: Invalid: Decimal precision out of range [1, 38]: 39" - assert_raise(Arrow::Error::Invalid.new(message)) do + assert_raise(Arrow::Error::Invalid) do Arrow::Decimal128DataType.new(39, 1) end end diff --git a/c_glib/test/test-decimal256-data-type.rb b/c_glib/test/test-decimal256-data-type.rb index 6d803f7ce9020..f5f89c2c46502 100644 --- a/c_glib/test/test-decimal256-data-type.rb +++ b/c_glib/test/test-decimal256-data-type.rb @@ -47,9 +47,7 @@ def test_decimal_data_type_new end def test_invalid_precision - message = - "[decimal256-data-type][new]: Invalid: Decimal precision out of range [1, 76]: 77" - assert_raise(Arrow::Error::Invalid.new(message)) do + assert_raise(Arrow::Error::Invalid) do Arrow::Decimal256DataType.new(77, 1) end end