Skip to content

Commit

Permalink
fix unit test and time out (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbellot000 committed Nov 18, 2022
1 parent 198f149 commit cee9142
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ansys/dpf/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
object_handler
)

try:
from grpc import _channel # noqa: F401
# weirdly necessary to delete LegacyGrpcError
except ImportError:
pass

LOG = logging.getLogger(__name__)
LOG.setLevel("DEBUG")

Expand Down
4 changes: 2 additions & 2 deletions ansys/dpf/core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,9 @@ def _load_result_info(self):
op.inputs.connect(self._stream_provider.outputs)
try:
result_info = op.get_output(0, types.result_info)
except _InactiveRpcError as e:
except Exception as e:
# give the user a more helpful error
if "results file is not defined in the Data sources" in e.details():
if "results file is not defined in the Data sources" in e.args():
raise RuntimeError("Unable to open result file") from None
else:
raise e
Expand Down
2 changes: 1 addition & 1 deletion ansys/dpf/core/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def start_local_server(
load_operators=True,
use_docker_by_default=True,
docker_config=RUNNING_DOCKER,
timeout=5.,
timeout=20.,
config=None,
use_pypim_by_default=True
):
Expand Down

0 comments on commit cee9142

Please sign in to comment.