shunping commented on code in PR #38501: URL: https://github.com/apache/beam/pull/38501#discussion_r3253451303
########## sdks/python/apache_beam/transforms/external_test.py: ########## @@ -799,7 +799,13 @@ def test_implicit_builder_with_constructor_method(self): class JavaJarExpansionServiceTest(unittest.TestCase): def setUp(self): - SubprocessServer._cache._live_owners = set() + # Temporarily override _live_owners with an empty set for this test, + # preventing contamination of the process-wide global cache and avoiding + # side effects on other tests. + patcher = mock.patch.object( + SubprocessServer._cache, '_live_owners', new=set()) + patcher.start() + self.addCleanup(patcher.stop) Review Comment: That a great idea, but it requires more code to implement. For now, we can just put these ideas in our back pocket. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
