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:
Sean McArthur
2019-09-06 17:22:56 -07:00
committed by GitHub
parent d7fcd8ac2e
commit ba7b2a754e
30 changed files with 1106 additions and 1430 deletions

View File

@@ -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");
}