timer: finish updating timer (#1222)

* timer: restructure feature flags
* update timer tests
* Add `async-traits` to CI

This also disables a buggy `threadpool` test. This test should be fixed in the future.

Refs #1225
This commit is contained in:
Carl Lerche
2019-06-30 08:48:53 -07:00
committed by GitHub
parent 8e7d8af588
commit b2c777846e
27 changed files with 786 additions and 755 deletions
+4 -29
View File
@@ -74,41 +74,16 @@ macro_rules! assert_pending {
}};
}
/*
/// Assert if a poll is ready and check for equality on the value
#[macro_export]
macro_rules! assert_ready_eq {
($e:expr, $expect:expr) => {
use $crate::codegen::futures::Async::Ready;
match $e {
Ok(e) => assert_eq!(e, Ready($expect)),
Err(e) => panic!("error = {:?}", e),
}
let val = $crate::assert_ready!($e);
assert_eq!(val, $expect)
};
($e:expr, $expect:expr, $($msg:tt),+) => {
use $crate::codegen::futures::Async::Ready;
match $e {
Ok(e) => assert_eq!(e, Ready($expect), $($msg)+),
Err(e) => {
let msg = format_args!($($msg),+);
panic!("error = {:?}; {}", e, msg)
}
}
let val = $crate::assert_ready!($e);
assert_eq!(val, $expect, $($msg),*)
};
}
*/
/*
/// Assert if the deadline has passed
#[macro_export]
macro_rules! assert_elapsed {
($e:expr) => {
assert!($e.unwrap_err().is_elapsed());
};
($e:expr, $($msg:expr),+) => {
assert!($e.unwrap_err().is_elapsed(), $msg);
};
}
*/