Skip to content
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

Fix flaky lsp test: publish_diagnostics_dead_code_warning #4856

Merged
merged 2 commits into from
Jul 25, 2023
Merged
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
6 changes: 1 addition & 5 deletions sway-lsp/tests/utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ pub async fn assert_server_requests(
) -> JoinHandle<()> {
tokio::spawn(async move {
let request_stream = socket.take(expected_requests.len()).collect::<Vec<_>>();
let requests =
tokio::time::timeout(timeout.unwrap_or(Duration::from_secs(10)), request_stream)
.await
.expect("Timed out waiting for requests from server");

let requests = request_stream.await;
assert_eq!(requests.len(), expected_requests.len());
for (actual, expected) in requests.iter().zip(expected_requests.iter()) {
assert_eq!(expected["method"], actual.method());
Expand Down