fix broadcast_future test case
We used to await all the futures via the runtime's shutdown method, which doesn't exist anymore, so await all the join handles instead. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
ba3eb88d95
commit
8554ac5ec3
|
@ -159,15 +159,14 @@ fn test_broadcast_future() {
|
||||||
.map_err(|err| { panic!("got errror {}", err); })
|
.map_err(|err| { panic!("got errror {}", err); })
|
||||||
.map(|_| ());
|
.map(|_| ());
|
||||||
|
|
||||||
let receiver_finish = sender.listen();
|
|
||||||
|
|
||||||
let mut rt = tokio::runtime::Runtime::new().unwrap();
|
let mut rt = tokio::runtime::Runtime::new().unwrap();
|
||||||
rt.block_on(async move {
|
rt.block_on(async move {
|
||||||
tokio::spawn(receiver1);
|
let r1 = tokio::spawn(receiver1);
|
||||||
tokio::spawn(receiver2);
|
let r2 = tokio::spawn(receiver2);
|
||||||
|
|
||||||
trigger.send(Ok(1)).unwrap();
|
trigger.send(Ok(1)).unwrap();
|
||||||
let _ = receiver_finish.await;
|
let _ = r1.await;
|
||||||
|
let _ = r2.await;
|
||||||
});
|
});
|
||||||
|
|
||||||
let result = CHECKSUM.load(Ordering::SeqCst);
|
let result = CHECKSUM.load(Ordering::SeqCst);
|
||||||
|
|
Loading…
Reference in New Issue