[lldb] Use Popen.wait in TestVSCode_launch

This commit is contained in:
Jonas Devlieghere 2023-08-25 12:59:52 -07:00
parent b825808d8b
commit 37086cadb1
No known key found for this signature in database
GPG Key ID: 49CC0BD90FDEED4D

View File

@ -46,12 +46,8 @@ class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase):
self.vscode.request_disconnect()
# Wait until the underlying lldb-vscode process dies.
# We need to do this because the popen.wait function in python2.7
# doesn't have a timeout argument.
for _ in range(10):
time.sleep(1)
if self.vscode.process.poll() is not None:
break
self.vscode.process.wait(timeout=10)
# Check the return code
self.assertEqual(self.vscode.process.poll(), 0)