From 3fbb905f79f4f800dd292e50ead38a6a96a61f3d Mon Sep 17 00:00:00 2001 From: sverhoeven Date: Thu, 26 Oct 2023 14:11:12 +0200 Subject: [PATCH] Dont wait forever after subproces is terminated --- .github/workflows/ci.yml | 1 + grpc4bmi/bmi_client_subproc.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e81500c..86c6569 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,7 @@ jobs: - name: Test with pytest run: | pytest -vv --cov=grpc4bmi --cov-report xml + timeout-minutes: 20 - name: Correct coverage paths run: sed -i "s+$PWD/++g" coverage.xml - name: SonarCloud analysis diff --git a/grpc4bmi/bmi_client_subproc.py b/grpc4bmi/bmi_client_subproc.py index 277440c..9b84081 100644 --- a/grpc4bmi/bmi_client_subproc.py +++ b/grpc4bmi/bmi_client_subproc.py @@ -27,7 +27,7 @@ def __init__(self, module_name, path=None, timeout=None, delay=1): def __del__(self): self.pipe.terminate() - self.pipe.wait() + self.pipe.wait(timeout=0.1) def get_value_ref(self, var_name): raise NotImplementedError("Cannot exchange memory references across process boundary")