Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ansys/mapdl/core/mapdl_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def _multi_connect(self, n_attempts=5, timeout=15, set_no_abort=True):

if not connected:
raise IOError(
f"Unable to connect to MAPDL gRPC instance at {self._target_str}"
f"Unable to connect to MAPDL gRPC instance at {self._channel_str}"
)

@property
Expand Down
9 changes: 9 additions & 0 deletions tests/test_database.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import re

import numpy as np
import pytest

Expand Down Expand Up @@ -204,3 +206,10 @@ def test_elems_push(elems):

with pytest.raises(ValueError, match="`elmdat` must be length 10"):
elems.push(ielm_new, [1, 2, 3], elem_info.nodes)


def test__channel_str(db):
assert db._channel_str is not None
assert ":" in db._channel_str
assert re.search("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", db._channel_str)
assert re.search("\d{4,6}", db._channel_str)
7 changes: 7 additions & 0 deletions tests/test_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,3 +359,10 @@ def test_download_project_extensions(mapdl, tmpdir):
assert "out" in files_extensions
assert "err" not in files_extensions
assert "lock" not in files_extensions


def test__channel_str(mapdl):
assert mapdl._channel_str is not None
assert ":" in mapdl._channel_str
assert re.search("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", mapdl._channel_str)
assert re.search("\d{4,6}", mapdl._channel_str)