test(benches): uses current_thread runtime in server benchmarks

This commit is contained in:
Sean McArthur
2018-10-23 15:38:06 -07:00
parent deaa5d1aa9
commit 4843364b5a

View File

@@ -42,7 +42,9 @@ macro_rules! bench_server {
.map_err(|e| panic!("server error: {}", e))
.select(until_rx.then(|_| Ok(())))
.then(|_| Ok(()));
tokio::run(fut);
let mut rt = tokio::runtime::current_thread::Runtime::new().unwrap();
rt.spawn(fut);
rt.run().unwrap();
});
addr_rx.recv().unwrap()