Skip to content

Commit

Permalink
fix answer extrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ShapeOfMatter authored and shumbo committed Nov 14, 2024
1 parent c30786b commit 2c1e810
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions chorus_lib/tests/kvs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,6 @@ fn run_test(request: Request, answer: Response) {
let backup2_projector = Projector::new(Backup2, transport_backup2);

let mut handles: Vec<thread::JoinHandle<Located<Response, Client>>> = Vec::new();
handles.push(
thread::Builder::new()
.name("Client".to_string())
.spawn(move || {
client_projector.epp_and_run(KVS::<HCons<Backup1, HCons<Backup2, HNil>>, _, _, _>{
request: client_projector.local(request),
_phantoms: PhantomData,
})
})
.unwrap(),
);
handles.push(
thread::Builder::new()
.name("Server".to_string())
Expand Down Expand Up @@ -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::<HCons<Backup1, HCons<Backup2, HNil>>, _, _, _>{
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]
Expand Down

0 comments on commit 2c1e810

Please sign in to comment.