Skip to content

Commit

Permalink
Update test.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Sep 5, 2023
1 parent 7729b73 commit befdedf
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions crates/els/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,6 @@ impl DummyClient {
}
}

#[allow(dead_code)]
fn wait_output(&mut self) -> Result<String, Box<dyn std::error::Error>> {
let mut buf = String::new();
loop {
self.stdout_buffer.read_to_string(&mut buf)?;
if buf.is_empty() {
safe_yield();
} else {
break;
}
}
Ok(buf)
}

/// the server periodically outputs health check messages
fn wait_outputs(&mut self, mut size: usize) -> Result<String, Box<dyn std::error::Error>> {
let mut buf = String::new();
Expand All @@ -146,10 +132,6 @@ impl DummyClient {
loop {
let mut buf = String::new();
self.stdout_buffer.read_to_string(&mut buf)?;
while !buf.ends_with('}') {
safe_yield();
self.stdout_buffer.read_to_string(&mut buf)?;
}
for msg in parse_msgs(&buf) {
if msg.get("method").is_some_and(|_| msg.get("id").is_some()) {
self.handle_server_request(&msg);
Expand Down

0 comments on commit befdedf

Please sign in to comment.