|
|
@ -27,6 +27,7 @@ def _get_number_active_threads(): |
|
|
|
class ForkPosixTester(unittest.TestCase): |
|
|
|
class ForkPosixTester(unittest.TestCase): |
|
|
|
|
|
|
|
|
|
|
|
def setUp(self): |
|
|
|
def setUp(self): |
|
|
|
|
|
|
|
self._saved_fork_support_flag = cygrpc._GRPC_ENABLE_FORK_SUPPORT |
|
|
|
cygrpc._GRPC_ENABLE_FORK_SUPPORT = True |
|
|
|
cygrpc._GRPC_ENABLE_FORK_SUPPORT = True |
|
|
|
|
|
|
|
|
|
|
|
def testForkManagedThread(self): |
|
|
|
def testForkManagedThread(self): |
|
|
@ -50,6 +51,9 @@ class ForkPosixTester(unittest.TestCase): |
|
|
|
thread.join() |
|
|
|
thread.join() |
|
|
|
self.assertEqual(0, _get_number_active_threads()) |
|
|
|
self.assertEqual(0, _get_number_active_threads()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def tearDown(self): |
|
|
|
|
|
|
|
cygrpc._GRPC_ENABLE_FORK_SUPPORT = self._saved_fork_support_flag |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@unittest.skipUnless(os.name == 'nt', 'Windows-specific tests') |
|
|
|
@unittest.skipUnless(os.name == 'nt', 'Windows-specific tests') |
|
|
|
class ForkWindowsTester(unittest.TestCase): |
|
|
|
class ForkWindowsTester(unittest.TestCase): |
|
|
|