|
|
@ -192,7 +192,7 @@ mod test { |
|
|
|
use crate::args;
|
|
|
|
use crate::async_utils::run;
|
|
|
|
use crate::command_runner::{CommandRunner, StdCommandRunner};
|
|
|
|
use futures::future::FutureExt;
|
|
|
|
use futures_util::future::FutureExt;
|
|
|
|
use std::time::Instant;
|
|
|
|
|
|
|
|
#[test]
|
|
|
@ -203,9 +203,9 @@ mod test { |
|
|
|
let start = Instant::now();
|
|
|
|
let res = c.run("sleep", args, "").fuse();
|
|
|
|
let ps = c.run("ps", args![], "").fuse();
|
|
|
|
futures::pin_mut!(res, ps);
|
|
|
|
futures_util::pin_mut!(res, ps);
|
|
|
|
loop {
|
|
|
|
futures::select! {
|
|
|
|
futures_util::select! {
|
|
|
|
_ = res => {},
|
|
|
|
_ = ps => assert!((Instant::now() - start).as_millis() < 1000),
|
|
|
|
complete => break,
|
|
|
|