equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
110 stars 56 forks source link

Solve Windows Python 3.12 test timeouts #1229

Open mferrera opened 1 month ago

mferrera commented 1 month ago

This item in the test matrix struggles with timeouts and with cross/forked process testing. We should figure out why so that it's no longer flaky.

mferrera commented 1 month ago

Most recent test failure:

================================== FAILURES ===================================
_____________________________ test_surface_forks ______________________________
[gw2] win32 -- Python 3.12.4 C:\hostedtoolcache\windows\Python\3.12.4\x64\python.exe

    def test_surface_forks():
        """Testing when surfaces are read by multiple forks"""

        process = subprocess.Popen(
            ["python", "multiprocess_surfs.py"],
            cwd="examples",
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
        )
        stdout, stderr = process.communicate()
        ret_code = process.wait()
>       assert ret_code == 0, stderr
E       AssertionError: b'INFO:__main__:Start 0\r
E         INFO:__main__:File is ../../xtgeo-testdata/surfaces/reek/1/basereek_rota.gri\r
E         INFO:xtgeo....xtgeo.surface.regular_surface:Start __init__ method for RegularSurface object 1433516089200\r
E         INFO:__main__:End 7\r
E         '
E       assert 3221356611 == 0

tests\test_surface\test_forks.py:22: AssertionError
=========================== short test summary info ===========================
FAILED tests/test_surface/test_forks.py::test_surface_forks - AssertionError: b'INFO:__main__:Start 0\r
  INFO:__main__:File is ../../xtgeo-testdata/surfaces/reek/1/basereek_rota.gri\r
  INFO:xtgeo....xtgeo.surface.regular_surface:Start __init__ method for RegularSurface object 1433516089200\r
  INFO:__main__:End 7\r
  '
assert 3221356611 == 0
= 1 failed, 1490 passed, 92 skipped, 1 xfailed, 1468 warnings in 490.59s (0:08:10) =