Disconnect FakeServer when dropping it

This prevents memory leak errors in tests, due to parked tasks waiting
for RPC responses.
This commit is contained in:
Max Brunsfeld 2022-05-31 18:09:33 -07:00
parent 3ea061a11e
commit b70396b8fb

View File

@ -178,6 +178,12 @@ impl FakeServer {
}
}
impl Drop for FakeServer {
fn drop(&mut self) {
self.disconnect();
}
}
pub struct FakeHttpClient {
handler: Box<
dyn 'static