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

[Python] BUG: two failing tests related to ARROW_DEFAULT_MEMORY_POOL in conda builds on unix #15017

Closed
h-vetinari opened this issue Dec 18, 2022 · 1 comment · Fixed by #36901

Comments

@h-vetinari
Copy link
Contributor

h-vetinari commented Dec 18, 2022

Describe the bug, including details regarding any error messages, version, and platform.

#14832 switched on the test suite within the conda-builds, which itself synced with conda-forge/arrow-cpp-feedstock#875

In the process of doing two tests failing with the same error were skipped,

# "Unsupported backend 'nonexistent' specified in ARROW_DEFAULT_MEMORY_POOL"
{% set tests_to_skip = tests_to_skip + " or (test_memory and test_env_var)" %} # [unix]

That error looks like:

FAILED test_memory.py::test_env_var - assert 2 == 1
 +  where 2 = len(['WARNING: Logging before InitGoogleLogging() is written to STDERR', "W20221123 12:16:17.825700 443543 memory_pool.cc:113] Unsupported backend 'nonexistent' specified in ARROW_DEFAULT_MEMORY_POOL (supported backends are 'mimalloc', 'jemalloc', 'system')"])

which might indicate a missing default somewhere?

To fix this, the line quoted above should be removed, and the conda tests still pass.

Component(s)

C++, Continuous Integration, Python

@kou
Copy link
Member

kou commented Dec 18, 2022

I think that we should improve our test for -DARROW_USE_GLOG=ON build:

diff --git a/python/pyarrow/tests/test_memory.py b/python/pyarrow/tests/test_memory.py
index 092c50de33..77057bef59 100644
--- a/python/pyarrow/tests/test_memory.py
+++ b/python/pyarrow/tests/test_memory.py
@@ -134,8 +134,14 @@ def check_env_var(name, expected, *, expect_warning=False):
         res.check_returncode()  # fail
     errlines = res.stderr.splitlines()
     if expect_warning:
-        assert len(errlines) == 1
-        assert f"Unsupported backend '{name}'" in errlines[0]
+        assert len(errlines) == 1 or len(errlines) == 2
+        if len(errlines) == 1:
+            # ARROW_USE_GLOG=OFF
+            assert f"Unsupported backend '{name}'" in errlines[0]
+        else
+            # ARROW_USE_GLOG=ON
+            assert f"InitGoogleLoggingd()" in errlines[0]
+            assert f"Unsupported backend '{name}'" in errlines[1]
     else:
         assert len(errlines) == 0
 

@kou kou changed the title BUG: two failing tests related to ARROW_DEFAULT_MEMORY_POOL in conda builds on unix [Python] BUG: two failing tests related to ARROW_DEFAULT_MEMORY_POOL in conda builds on unix Jul 27, 2023
kou added a commit that referenced this issue Jul 28, 2023
…ON (#36901)

Accept output pattern for ARROW_USE_GLOG=ON too.

* Closes: #15017

Lead-authored-by: H. Vetinari <h.vetinari@gmx.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 14.0.0 milestone Jul 28, 2023
R-JunmingChen pushed a commit to R-JunmingChen/arrow that referenced this issue Aug 20, 2023
…_GLOG=ON (apache#36901)

Accept output pattern for ARROW_USE_GLOG=ON too.

* Closes: apache#15017

Lead-authored-by: H. Vetinari <h.vetinari@gmx.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this issue Nov 13, 2023
…_GLOG=ON (apache#36901)

Accept output pattern for ARROW_USE_GLOG=ON too.

* Closes: apache#15017

Lead-authored-by: H. Vetinari <h.vetinari@gmx.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment