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 2105eaa4d23 Disable grpc fork support on some test suites. (#38566)
2105eaa4d23 is described below

commit 2105eaa4d235fb84a6c2daae7fc5f4c5be66cd1d
Author: Shunping Huang <[email protected]>
AuthorDate: Wed May 20 12:06:07 2026 -0400

    Disable grpc fork support on some test suites. (#38566)
    
    * Disable grpc fork support in some test suite.
    
    * Disable GRPC fork support.
    
    * Add TODOs
---
 .../runners/portability/portable_runner_test.py         | 17 +++++++++++++++++
 sdks/python/apache_beam/utils/subprocess_server_test.py | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)

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 0f44afb2f12..a1ed7448f05 100644
--- a/sdks/python/apache_beam/runners/portability/portable_runner_test.py
+++ b/sdks/python/apache_beam/runners/portability/portable_runner_test.py
@@ -18,6 +18,7 @@
 
 import inspect
 import logging
+import os
 import socket
 import subprocess
 import sys
@@ -328,6 +329,22 @@ 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()
diff --git a/sdks/python/apache_beam/utils/subprocess_server_test.py 
b/sdks/python/apache_beam/utils/subprocess_server_test.py
index efd357c4c13..073b8b3bcbe 100644
--- a/sdks/python/apache_beam/utils/subprocess_server_test.py
+++ b/sdks/python/apache_beam/utils/subprocess_server_test.py
@@ -37,6 +37,23 @@ from apache_beam.utils import subprocess_server
 
 
 class JavaJarServerTest(unittest.TestCase):
+
+  # 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 test_gradle_jar_release(self):
     self.assertEqual(
         'https://repo.maven.apache.org/maven2/org/apache/beam/'

Reply via email to