add SystemRunner::run_until_complete() for testing purpose
use std::collections::HashMap;
use tokio_core::reactor::{Core, Handle};
+use futures::Future;
use futures::sync::oneshot::{channel, Receiver, Sender};
use actor::Actor;
@@ -104,6 +105,12 @@ impl SystemRunner {
Err(_) => 1,
}
}
+
+ pub fn run_until_complete<F, I, E>(&mut self, fut: F) -> Result<I, E>
+ where F: Future<Item=I, Error=E>
+ {
+ self.core.run(fut)
+ }
}
impl Handler<SystemExit> for System {
