mirror of https://github.com/fafhrd91/actix-net
fix waker test. bump MSRV
This commit is contained in:
parent
8abd8e66d6
commit
fea17ca030
|
@ -18,7 +18,7 @@ jobs:
|
|||
- { name: Windows (MinGW), os: windows-latest, triple: x86_64-pc-windows-gnu }
|
||||
- { name: Windows (32-bit), os: windows-latest, triple: i686-pc-windows-msvc }
|
||||
version:
|
||||
- 1.46.0 # MSRV
|
||||
- 1.51.0 # MSRV
|
||||
- stable
|
||||
- nightly
|
||||
|
||||
|
|
|
@ -99,18 +99,20 @@ mod test {
|
|||
|
||||
#[test]
|
||||
fn test_waker_channel() {
|
||||
let poll = mio::Poll::new().unwrap();
|
||||
let mut poll = mio::Poll::new().unwrap();
|
||||
|
||||
let waker = from_registry(poll.registry()).unwrap();
|
||||
|
||||
let cx = &mut Context::from_waker(&waker);
|
||||
|
||||
let (tx, mut rx) = waker_channel();
|
||||
|
||||
assert!(rx.poll_recv(cx).is_pending());
|
||||
|
||||
tx.wake(super::WakerInterest::Stop);
|
||||
|
||||
let mut events = mio::Events::with_capacity(1);
|
||||
poll.poll(&mut events, None).unwrap();
|
||||
assert_eq!(events.iter().next().unwrap().token(), WAKER_TOKEN);
|
||||
|
||||
match rx.poll_recv(cx) {
|
||||
Poll::Ready(Some(WakerInterest::Stop)) => {}
|
||||
_ => panic!("Failed to wake up WakerRx"),
|
||||
|
|
Loading…
Reference in New Issue