Skip to content

[lldb-dap] Fix flaky test #145231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lldb/test/API/tools/lldb-dap/server/TestDAP_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ def test_server_interrupt(self):
# Interrupt the server which should disconnect all clients.
process.send_signal(signal.SIGINT)

self.dap_server.wait_for_terminated()
# Wait for both events since they can happen in any order.
self.dap_server.wait_for_event(["terminated", "exited"])
self.dap_server.wait_for_event(["terminated", "exited"])
self.assertIsNotNone(
self.dap_server.exit_status,
"Process exited before interrupting lldb-dap server",
Expand Down
2 changes: 0 additions & 2 deletions lldb/tools/lldb-dap/tool/lldb-dap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,6 @@ serveConnection(const Socket::SocketProtocol &protocol, const std::string &name,
<< " disconnected failed: "
<< llvm::toString(std::move(error)) << "\n";
}
// Close the socket to ensure the DAP::Loop read finishes.
sock->Close();
}
}

Expand Down
Loading