diff --git a/chorus_lib/tests/kvs.rs b/chorus_lib/tests/kvs.rs index 5279c34..22a13bc 100644 --- a/chorus_lib/tests/kvs.rs +++ b/chorus_lib/tests/kvs.rs @@ -172,17 +172,6 @@ fn run_test(request: Request, answer: Response) { let backup2_projector = Projector::new(Backup2, transport_backup2); let mut handles: Vec>> = Vec::new(); - handles.push( - thread::Builder::new() - .name("Client".to_string()) - .spawn(move || { - client_projector.epp_and_run(KVS::>, _, _, _>{ - request: client_projector.local(request), - _phantoms: PhantomData, - }) - }) - .unwrap(), - ); handles.push( thread::Builder::new() .name("Server".to_string()) @@ -216,12 +205,14 @@ fn run_test(request: Request, answer: Response) { }) .unwrap(), ); - let retval = Projector::new(Client, LocalTransport::new(Client, transport_channel.clone())) - .unwrap(handles.pop().unwrap().join().unwrap()); + let retval = client_projector.epp_and_run(KVS::>, _, _, _>{ + request: client_projector.local(request), + _phantoms: PhantomData, + }); for handle in handles { handle.join().unwrap(); } - assert_eq!(retval, answer); + assert_eq!(client_projector.unwrap(retval), answer); } #[test]