Skip to content

Commit d606a85

Browse files
committed
Disable grpc fork support in some test suite.
1 parent a2cb789 commit d606a85

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

sdks/python/apache_beam/runners/portability/portable_runner_test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,22 @@ class PortableRunnerTestWithSubprocessesAndMultiWorkers(
328328
PortableRunnerTestWithSubprocesses):
329329
_use_subprocesses = True
330330

331+
@classmethod
332+
def setUpClass(cls):
333+
import os
334+
cls._old_fork_support = os.environ.get('GRPC_ENABLE_FORK_SUPPORT')
335+
os.environ['GRPC_ENABLE_FORK_SUPPORT'] = 'false'
336+
super().setUpClass()
337+
338+
@classmethod
339+
def tearDownClass(cls):
340+
import os
341+
if cls._old_fork_support is None:
342+
os.environ.pop('GRPC_ENABLE_FORK_SUPPORT', None)
343+
else:
344+
os.environ['GRPC_ENABLE_FORK_SUPPORT'] = cls._old_fork_support
345+
super().tearDownClass()
346+
331347
def create_options(self):
332348
options = super() \
333349
.create_options()

0 commit comments

Comments
 (0)