fix tests/worker-task-abort.rs - correctly spawn command socket
And wait for the task. Note: The test is still ignored (but works now when run a root)
This commit is contained in:
parent
ccc3896ff3
commit
36c6e7bb82
|
@ -31,7 +31,8 @@ fn garbage_collection(worker: &server::WorkerTask) -> Result<(), Error> {
|
|||
}
|
||||
|
||||
|
||||
#[test] #[ignore]
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn worker_task_abort() -> Result<(), Error> {
|
||||
|
||||
server::create_task_log_dirs()?;
|
||||
|
@ -57,6 +58,11 @@ fn worker_task_abort() -> Result<(), Error> {
|
|||
return;
|
||||
}
|
||||
|
||||
if let Err(err) = commando_sock.spawn() {
|
||||
eprintln!("unable to spawn command socket - {}", err);
|
||||
return;
|
||||
}
|
||||
|
||||
let errmsg = errmsg1.clone();
|
||||
let res = server::WorkerTask::new_thread(
|
||||
"garbage_collection",
|
||||
|
@ -87,7 +93,8 @@ fn worker_task_abort() -> Result<(), Error> {
|
|||
Ok(wid) => {
|
||||
println!("WORKER: {}", wid);
|
||||
server::abort_worker_async(wid.parse::<UPID>().unwrap());
|
||||
}
|
||||
server::wait_for_local_worker(&wid).await.unwrap();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue