`test_xpl.py::test_save` fails on v24.2
germa89 opened this issue · comments
German commented
this is due to a bug (977113) in MAPDL.
(venv) {REDACTED@ REDACTED}{/home/REDACTED/REDACTED/Linux_Agent/_work/11/s/repo/pymapdl}$ xvfb-run pytest -k "test_save and xpl" -vvv
======================================================================================== test session starts =========================================================================================
platform linux -- Python 3.11.5, pytest-8.1.1, pluggy-1.4.0 -- /home/REDACTED/REDACTED/Linux_Agent/_work/11/s/repo/venv/bin/python
cachedir: .pytest_cache
rootdir: /home/REDACTED/REDACTED/Linux_Agent/_work/11/s/repo/pymapdl
configfile: pyproject.toml
testpaths: tests
plugins: rerunfailures-14.0, pytest_pyvista-0.1.9, memprof-0.2.0, cov-4.1.0
collected 1610 items / 1609 deselected / 1 skipped / 1 selected
tests/test_xpl.py::test_save FAILED [100%]
============================================================================================== FAILURES ==============================================================================================
_____________________________________________________________________________________________ test_save ______________________________________________________________________________________________
xpl = <[MapdlExitedError('MAPDL server connection terminated with the following error\n<_InactiveRpcError of RPC that termin...:50052: Failed to connect to remote host: Connection refused"}"\n>') raised in repr()] ansXpl object at 0x14cc0bc33b90>
def test_save(xpl):
> xpl.save()
tests/test_xpl.py:83:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../venv/lib64/python3.11/site-packages/ansys/mapdl/core/xpl.py:381: in save
response = self._mapdl.run("*XPL,SAVE").strip()
../venv/lib64/python3.11/site-packages/ansys/mapdl/core/mapdl_core.py:2212: in run
text = self._run(command, verbose=verbose, mute=mute)
../venv/lib64/python3.11/site-packages/ansys/mapdl/core/mapdl_grpc.py:898: in _run
response = self._send_command(cmd, mute=mute)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<ansys.mapdl.core.mapdl_grpc.MapdlGrpc object at 0x14cc09079890>, '*XPL,SAVE'), kwargs = {'mute': False}, old_handler = <built-in function default_int_handler>, class_name = 'MapdlGrpc'
mapdl = <ansys.mapdl.core.mapdl_grpc.MapdlGrpc object at 0x14cc09079890>
@wraps(func)
def wrapper(*args, **kwargs):
"""Capture gRPC exceptions and KeyboardInterrupt"""
# capture KeyboardInterrupt
old_handler = None
if threading.current_thread().__class__.__name__ == "_MainThread":
if threading.current_thread().is_alive():
old_handler = signal.signal(signal.SIGINT, handler)
# Capture gRPC exceptions
try:
out = func(*args, **kwargs)
except (_InactiveRpcError, _MultiThreadedRendezvous) as error:
# can't use isinstance here due to circular imports
try:
class_name = args[0].__class__.__name__
except:
class_name = ""
if class_name == "MapdlGrpc":
mapdl = args[0]
elif hasattr(args[0], "_mapdl"):
mapdl = args[0]._mapdl
# Must close unfinished processes
mapdl._close_process()
> raise MapdlExitedError(
f"MAPDL server connection terminated with the following error\n{error}"
) from None
E ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error
E <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.UNAVAILABLE
E details = "Socket closed"
E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Socket closed", grpc_status:14, created_time:"2024-03-18T13:46:49.059524792-04:00"}"
E >
../venv/lib64/python3.11/site-packages/ansys/mapdl/core/errors.py:319: MapdlExitedError
==================================================================================== memory consumption estimates ====================================================================================
pymapdl::tests::test_xpl.py::test_save - 3.8 MB
==================================================================================== PyMAPDL Pytest short summary ====================================================================================
[FAILED] test_save - E >