This is an automated email from the ASF dual-hosted git repository.
shunping pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new f771827d9f1 Disable gRPC fork support in
PortableRunnerTestWithSubprocesses (#38744)
f771827d9f1 is described below
commit f771827d9f17ddfa4ce7a788f49418c4d61246ed
Author: Shunping Huang <[email protected]>
AuthorDate: Fri May 29 14:23:59 2026 -0400
Disable gRPC fork support in PortableRunnerTestWithSubprocesses (#38744)
Avoids deadline exceeded failures in subprocess tests. Redundant setup and
teardown in the multi-worker subclass are removed to inherit them cleanly.
---
.../runners/portability/portable_runner_test.py | 32 +++++++++++-----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git
a/sdks/python/apache_beam/runners/portability/portable_runner_test.py
b/sdks/python/apache_beam/runners/portability/portable_runner_test.py
index a1ed7448f05..e781e13ce66 100644
--- a/sdks/python/apache_beam/runners/portability/portable_runner_test.py
+++ b/sdks/python/apache_beam/runners/portability/portable_runner_test.py
@@ -295,6 +295,22 @@ class
PortableRunnerTestWithExternalEnv(PortableRunnerTest):
class PortableRunnerTestWithSubprocesses(PortableRunnerTest):
_use_subprocesses = True
+ # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed.
+ @classmethod
+ def setUpClass(cls):
+ cls._old_fork_support = os.environ.get('GRPC_ENABLE_FORK_SUPPORT')
+ os.environ['GRPC_ENABLE_FORK_SUPPORT'] = 'false'
+ super().setUpClass()
+
+ # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed.
+ @classmethod
+ def tearDownClass(cls):
+ if cls._old_fork_support is None:
+ os.environ.pop('GRPC_ENABLE_FORK_SUPPORT', None)
+ else:
+ os.environ['GRPC_ENABLE_FORK_SUPPORT'] = cls._old_fork_support
+ super().tearDownClass()
+
def create_options(self):
options = super().create_options()
options.view_as(PortableOptions).environment_type = (
@@ -329,22 +345,6 @@ class PortableRunnerTestWithSubprocessesAndMultiWorkers(
PortableRunnerTestWithSubprocesses):
_use_subprocesses = True
- # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed.
- @classmethod
- def setUpClass(cls):
- cls._old_fork_support = os.environ.get('GRPC_ENABLE_FORK_SUPPORT')
- os.environ['GRPC_ENABLE_FORK_SUPPORT'] = 'false'
- super().setUpClass()
-
- # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed.
- @classmethod
- def tearDownClass(cls):
- if cls._old_fork_support is None:
- os.environ.pop('GRPC_ENABLE_FORK_SUPPORT', None)
- else:
- os.environ['GRPC_ENABLE_FORK_SUPPORT'] = cls._old_fork_support
- super().tearDownClass()
-
def create_options(self):
options = super() \
.create_options()