[lldb-dap] Add progress events to the packet list (#134157)

Before #134048, TestDAP_Progress relied on wait_for_event to block until
the progressEnd came in. However, progress events were not added to the
packet list, so this call would always time out. This PR makes it so
that packets are added to the packet list, and you can block on them.
This commit is contained in:
Jonas Devlieghere 2025-04-02 15:33:07 -07:00 committed by GitHub
parent dedb632b83
commit 3f7ca88267
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -255,8 +255,6 @@ class DebugCommunication(object):
# and 'progressEnd' events. Keep these around in case test
# cases want to verify them.
self.progress_events.append(packet)
# No need to add 'progress' event packets to our packets list.
return keepGoing
elif packet_type == "response":
if packet["command"] == "disconnect":

View File

@ -19,6 +19,7 @@ class TestDAP_progress(lldbdap_testcase.DAPTestCaseBase):
expected_not_in_message=None,
only_verify_first_update=False,
):
self.dap_server.wait_for_event("progressEnd")
self.assertTrue(len(self.dap_server.progress_events) > 0)
start_found = False
update_found = False