Skip to content

Commit cee9142

Browse files
authored
fix unit test and time out (#626)
1 parent 198f149 commit cee9142

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

ansys/dpf/core/core.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
object_handler
2626
)
2727

28+
try:
29+
from grpc import _channel # noqa: F401
30+
# weirdly necessary to delete LegacyGrpcError
31+
except ImportError:
32+
pass
33+
2834
LOG = logging.getLogger(__name__)
2935
LOG.setLevel("DEBUG")
3036

ansys/dpf/core/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ def _load_result_info(self):
412412
op.inputs.connect(self._stream_provider.outputs)
413413
try:
414414
result_info = op.get_output(0, types.result_info)
415-
except _InactiveRpcError as e:
415+
except Exception as e:
416416
# give the user a more helpful error
417-
if "results file is not defined in the Data sources" in e.details():
417+
if "results file is not defined in the Data sources" in e.args():
418418
raise RuntimeError("Unable to open result file") from None
419419
else:
420420
raise e

ansys/dpf/core/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def start_local_server(
127127
load_operators=True,
128128
use_docker_by_default=True,
129129
docker_config=RUNNING_DOCKER,
130-
timeout=5.,
130+
timeout=20.,
131131
config=None,
132132
use_pypim_by_default=True
133133
):

0 commit comments

Comments
 (0)