timing for another sync test
extern crate actix;
extern crate futures;
+extern crate tokio_core;
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, AtomicBool, Ordering};
+use std::time::Duration;
use actix::prelude::*;
use futures::{Future, future};
+use tokio_core::reactor::Timeout;
#[derive(Debug)]
struct Num(usize);
@@ -135,10 +138,13 @@ fn test_restart_sync_actor() {
Arbiter::handle().spawn_fn(move || {
addr.call_fut(Num(4))
+ .then(move |_| {
+ Timeout::new(Duration::new(0, 100_000), Arbiter::handle()).unwrap()
.then(move |_| {
Arbiter::system().send(actix::msgs::SystemExit(0));
future::result(Ok(()))
})
+ })
});
sys.run();
