Skip to content

Commit

Permalink
clean up code
Browse files Browse the repository at this point in the history
- use port 0 instead of a static atomic int (makes this work with cargo nextest)
- add some helpers for client/server config creation
  • Loading branch information
folkertdev committed Nov 27, 2023
1 parent 79ab739 commit d8f3a3e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ntpd/src/daemon/keyexchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -951,13 +951,8 @@ mod tests {
let port = listener.local_addr().unwrap().port();

tokio::spawn(async move {
// give the server some time to make the port available
tokio::time::sleep(std::time::Duration::from_millis(20)).await;

// create the stream, then shut it down without sending anything
let stream = client_tls_stream("localhost", port).await;

// "dirty" shutdown
stream.into_inner().0.shutdown().await.unwrap();
});

Expand Down

0 comments on commit d8f3a3e

Please sign in to comment.