refactor all to async/await (#617)
Co-authored-by: Danny Browning <danny.browning@protectwise.com> Co-authored-by: Daniel Eades <danieleades@hotmail.com>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#[macro_use]
|
||||
mod support;
|
||||
|
||||
use std::io::Read;
|
||||
use std::time::Duration;
|
||||
|
||||
/// Tests that internal client future cancels when the oneshot channel
|
||||
/// is canceled.
|
||||
#[test]
|
||||
fn timeout_closes_connection() {
|
||||
let _ = env_logger::try_init();
|
||||
@@ -156,7 +157,6 @@ fn test_read_timeout() {
|
||||
&"5"
|
||||
);
|
||||
|
||||
let mut buf = [0; 1024];
|
||||
let err = res.read(&mut buf).unwrap_err();
|
||||
let err = res.text().unwrap_err();
|
||||
assert_eq!(err.to_string(), "timed out");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user