cool-easter-32542
09/17/2023, 8:43 AM==================== FAILURES ====================
_ TestProcessMetadataManager.test_deadline_until _
self = <pants_test.pantsd.test_process_manager.TestProcessMetadataManager testMethod=test_deadline_until>
def test_deadline_until(self):
with self.assertRaises(ProcessMetadataManager.Timeout):
with self.captured_logging(<http://logging.INFO|logging.INFO>) as captured:
self.pmm._deadline_until(lambda: False, 'the impossible', timeout=.5, info_interval=.1)
self.assertTrue(4 <= len(captured.infos()) <= 6,
> 'Expected between 4 and 6 infos, got: {}'.format(captured.infos()))
E AssertionError: False is not true : Expected between 4 and 6 infos, got: ['pants.pantsd.process_manager: waiting for the impossible...', 'pants.pantsd.process_manager: waiting for the impossible...', 'pants.pantsd.process_manager: waiting for the impossible...']
pants_test/pantsd/test_process_manager.py:147: AssertionError
--------------- Captured log call ----------------
process_manager.py 138 INFO waiting for the impossible...
process_manager.py 138 INFO waiting for the impossible...
process_manager.py 138 INFO waiting for the impossible...
generated xml file: /home/travis/build/pantsbuild/pants/.pants.d/test/pytest/tests.python.pants_test.pantsd.process_manager/junitxml/TEST-tests.python.pants_test.pantsd.process_manager.xml
Any approach to more robustly test this sort of ipc seems like it could be dealt with at least partially in a similar way to any code that e.g. retries network requests (and there's no reason this code would need to only be usable in tests).
pantsbuild/pantscool-easter-32542
09/17/2023, 8:43 AM